(user)
| 128 | return userInstance?.get({ plain: true }) ?? null |
| 129 | }, |
| 130 | async updateUser(user) { |
| 131 | await sync() |
| 132 | |
| 133 | await User.update(user, { where: { id: user.id } }) |
| 134 | const userInstance = await User.findByPk(user.id) |
| 135 | |
| 136 | // eslint-disable-next-line @typescript-eslint/no-non-null-assertion |
| 137 | return userInstance! |
| 138 | }, |
| 139 | async deleteUser(userId) { |
| 140 | await sync() |
| 141 |