mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
parent
eb8dfa283e
commit
3066c8198c
20 changed files with 640 additions and 160 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { Body, Controller, Delete, Get, HttpCode, HttpStatus, Param, Post, Put, Query } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { AssetStatsDto, AssetStatsResponseDto } from 'src/dtos/asset.dto';
|
||||
import { AuthDto } from 'src/dtos/auth.dto';
|
||||
import { UserPreferencesResponseDto, UserPreferencesUpdateDto } from 'src/dtos/user-preferences.dto';
|
||||
import {
|
||||
|
|
@ -57,6 +58,16 @@ export class UserAdminController {
|
|||
return this.service.delete(auth, id, dto);
|
||||
}
|
||||
|
||||
@Get(':id/statistics')
|
||||
@Authenticated({ permission: Permission.ADMIN_USER_READ, admin: true })
|
||||
getUserStatisticsAdmin(
|
||||
@Auth() auth: AuthDto,
|
||||
@Param() { id }: UUIDParamDto,
|
||||
@Query() dto: AssetStatsDto,
|
||||
): Promise<AssetStatsResponseDto> {
|
||||
return this.service.getStatistics(auth, id, dto);
|
||||
}
|
||||
|
||||
@Get(':id/preferences')
|
||||
@Authenticated({ permission: Permission.ADMIN_USER_READ, admin: true })
|
||||
getUserPreferencesAdmin(@Auth() auth: AuthDto, @Param() { id }: UUIDParamDto): Promise<UserPreferencesResponseDto> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue