mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(server): guards, decorators, and utils (#3060)
This commit is contained in:
parent
f55b3add80
commit
d69fa3ceae
54 changed files with 243 additions and 255 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import { AuthUserDto } from '@app/immich/decorators/auth-user.decorator';
|
||||
import { AuthGuard } from '@app/immich/middlewares/auth.guard';
|
||||
import { AuthUserDto } from '@app/domain';
|
||||
import { AppGuard } from '@app/immich/app.guard';
|
||||
import { CanActivate, ExecutionContext } from '@nestjs/common';
|
||||
import { TestingModuleBuilder } from '@nestjs/testing';
|
||||
import { DataSource } from 'typeorm';
|
||||
|
|
@ -34,5 +34,5 @@ export function authCustom(builder: TestingModuleBuilder, callback: CustomAuthCa
|
|||
return true;
|
||||
},
|
||||
};
|
||||
return builder.overrideProvider(AuthGuard).useValue(canActivate);
|
||||
return builder.overrideProvider(AppGuard).useValue(canActivate);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue