|
|
@@ -21,6 +21,7 @@ schema.plugin(mongoosePaginate);
|
|
|
* @class Tag
|
|
|
*/
|
|
|
class Tag {
|
|
|
+
|
|
|
static async findOrCreate(tagName) {
|
|
|
const tag = await this.findOne({ name: tagName });
|
|
|
if (!tag) {
|
|
|
@@ -28,6 +29,7 @@ class Tag {
|
|
|
}
|
|
|
return tag;
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
module.exports = function() {
|