example frontend-backend communication

This commit is contained in:
2025-09-24 20:19:58 +02:00
parent bf9ae5f01f
commit bba4044eaf
13 changed files with 412 additions and 33 deletions
@@ -5,9 +5,7 @@ import { BaseMapper } from './BaseMapper';
export class UserMapper {
static toShortDto(user: UserAggregate): ShortUserDto {
return {
id: user.id,
username: user.username,
state: user.state,
authLevel: (user.state === UserState.ADMIN ? 1 : 0) as 0 | 1,
};
}
@@ -10,9 +10,7 @@ export interface UpdateUserDto {
}
export interface ShortUserDto {
id: string;
username: string;
state: number;
authLevel: 0 | 1;
}