diff --git a/backend/dao/user.js b/backend/dao/user.js index d9395512c..abfa6c645 100644 --- a/backend/dao/user.js +++ b/backend/dao/user.js @@ -53,9 +53,14 @@ class UsersDAO { } static async addTag(uid, name) { - return await mongoDB() + let id = uuid.v4(); + await mongoDB() .collection("users") - .updateOne({ uid }, { $push: { tags: { id: uuid.v4(), name } } }); + .updateOne({ uid }, { $push: { tags: { id, name } } }); + return { + id, + name, + }; } static async getTags(uid) {