Skip to content
Snippets Groups Projects

Hin 1232 send correct email to new author

Merged Tania Fecheta requested to merge HIN-1232-send-correct-email-to-newAuthor into develop
All threads resolved!
Files
5
@@ -64,6 +64,13 @@ class User {
return eics
}
async isAdmin(user) {
const { UserModel } = this
const users = await UserModel.all()
const admin = users.filter(user => user.admin)
return user === admin[0].id
}
async updateUserTeams({ userId, teamId }) {
const user = await this.UserModel.find(userId)
user.teams.push(teamId)