mirror of
https://github.com/immich-app/immich
synced 2026-08-22 13:13:05 +00:00
refactor: move static methods into util
This commit is contained in:
parent
db22797ae6
commit
36baeb603f
7 changed files with 92 additions and 95 deletions
|
|
@ -20,11 +20,7 @@ export class MaintenanceController {
|
|||
@Post('start')
|
||||
@Authenticated({ permission: Permission.Maintenance, admin: true })
|
||||
async startMaintenance(@Auth() auth: AuthDto, @Res({ passthrough: true }) response: Response): Promise<void> {
|
||||
const { secret } = await this.service.startMaintenance();
|
||||
const jwt = await this.service.createJwt(secret, {
|
||||
username: auth.user.name,
|
||||
});
|
||||
|
||||
const { jwt } = await this.service.startMaintenance(auth);
|
||||
response.cookie(ImmichCookie.MaintenanceToken, jwt);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue