user tags not required when loading user

This commit is contained in:
Miodec 2022-02-03 23:18:30 +01:00
parent 0ef370ca80
commit b4288d9bd2

View file

@ -95,8 +95,8 @@ class UsersDAO {
static async getTags(uid) {
const user = await mongoDB().collection("users").findOne({ uid });
if (!user) throw new MonkeyError(404, "User not found", "get tags");
return user.tags;
// if (!user) throw new MonkeyError(404, "User not found", "get tags");
return user?.tags ?? [];
}
static async editTag(uid, _id, name) {