Skip to content

Commit

Permalink
added is self return to user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
Andcool-Systems committed Nov 18, 2024
1 parent 2d1613f commit e7a9493
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,13 @@ export class UserService {
}
}

if (user.id === session?.user?.id) {
return {
statusCode: 200,
is_self: user.id === session?.user?.id
}
}

const can_view = hasAccess(session?.user, RolesEnum.UpdateUsers);
const current_discord = await this.getCurrentData(user.discordId);

Expand Down

0 comments on commit e7a9493

Please sign in to comment.