mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
refactor: access repository (#15490)
This commit is contained in:
parent
318dd32363
commit
b0cdd8f475
9 changed files with 75 additions and 152 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { UserEntity } from 'src/entities/user.entity';
|
||||
import { Permission } from 'src/enum';
|
||||
import { AccessRepository } from 'src/repositories/access.repository';
|
||||
import { ActivityRepository } from 'src/repositories/activity.repository';
|
||||
|
||||
export type AuthApiKey = {
|
||||
|
|
@ -12,6 +13,7 @@ export type AuthApiKey = {
|
|||
export type RepositoryInterface<T extends object> = Pick<T, keyof T>;
|
||||
|
||||
export type IActivityRepository = RepositoryInterface<ActivityRepository>;
|
||||
export type IAccessRepository = { [K in keyof AccessRepository]: RepositoryInterface<AccessRepository[K]> };
|
||||
|
||||
export type ActivityItem =
|
||||
| Awaited<ReturnType<IActivityRepository['create']>>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue