feat: log staff sign-in and sign-out and force logout at a set time
This commit is contained in:
@@ -17,6 +17,7 @@ import {
|
||||
InviteUserDto,
|
||||
UpdateOrgUserDto,
|
||||
UpdateUserCommissionDto,
|
||||
UpdateLogoutTimeDto,
|
||||
UpdateUserRoleDto,
|
||||
UpdateUserStatusDto,
|
||||
UpdateUserVisibilityDto,
|
||||
@@ -66,6 +67,21 @@ export class UsersController {
|
||||
);
|
||||
}
|
||||
|
||||
@Patch(':id/logout-time')
|
||||
@Roles('owner', 'admin')
|
||||
updateLogoutTime(
|
||||
@CurrentUser() user: { organizationId: string; role: UserRole },
|
||||
@Param('id') id: string,
|
||||
@Body() dto: UpdateLogoutTimeDto,
|
||||
) {
|
||||
return this.usersService.updateLogoutTime(
|
||||
user.organizationId,
|
||||
user.role,
|
||||
id,
|
||||
dto.logoutTime ?? null,
|
||||
);
|
||||
}
|
||||
|
||||
@Patch(':id/commission')
|
||||
@Roles('owner', 'admin')
|
||||
updateCommission(
|
||||
|
||||
Reference in New Issue
Block a user