fix: скрыл инфу о активности ака и перестал выдавать рефреши если ак не активен
This commit is contained in:
@@ -4,6 +4,7 @@ import type {
|
||||
CoinTransactionDto,
|
||||
LectureDto,
|
||||
ReviewDto,
|
||||
CurrentUserDto,
|
||||
UserAuthDto,
|
||||
UserDto,
|
||||
UserStatsDto,
|
||||
@@ -29,7 +30,7 @@ function getDefaultActiveRole(roles: UserRole[]): UserRole {
|
||||
return 'student'
|
||||
}
|
||||
|
||||
export function mapApiUser(user: UserAuthDto | UserDto, stats?: UserStatsDto): User {
|
||||
export function mapApiUser(user: UserAuthDto | UserDto | CurrentUserDto, stats?: UserStatsDto): User {
|
||||
const roles = mapApiRoles(user.roles)
|
||||
return {
|
||||
id: String(user.id),
|
||||
|
||||
Reference in New Issue
Block a user