fix(services): add missing real time

This commit is contained in:
Divlo
2022-03-02 11:47:13 +01:00
parent c23239c0da
commit 1bcee76324
5 changed files with 92 additions and 32 deletions

View File

@ -131,6 +131,14 @@ export const putCurrentUser: FastifyPluginAsync = async (fastify) => {
website: parseStringNullish(request.user.current.website, website)
}
})
await fastify.io.emitToAuthorizedUsers({
event: 'users',
isAuthorizedCallback: () => true,
payload: {
action: 'update',
item: user
}
})
reply.statusCode = 200
return {
user: {