chore: Add additional missing events (#1639)

* chore: Add additional missing events
signed in
profile updated
team setting updated

* Minor refactor to DRY existing code

* Add events

* lint

* flow: Add missing ip to event types
This commit is contained in:
Tom Moor
2020-11-14 20:44:18 -08:00
committed by GitHub
parent 7bdcba46b8
commit 19ab32f551
7 changed files with 98 additions and 66 deletions

View File

@@ -69,6 +69,14 @@ router.post("users.update", auth(), async (ctx) => {
await user.save();
await Event.create({
name: "users.update",
actorId: user.id,
userId: user.id,
teamId: user.teamId,
ip: ctx.request.ip,
});
ctx.body = {
data: presentUser(user, { includeDetails: true }),
};