mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: auth login event (#17934)
This commit is contained in:
parent
64e738f79d
commit
f64e6f5dc3
4 changed files with 24 additions and 16 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import type { LoginResponseDto } from '@immich/sdk';
|
||||
|
||||
type Listener<EventMap extends Record<string, unknown[]>, K extends keyof EventMap> = (...params: EventMap[K]) => void;
|
||||
|
||||
class EventManager<EventMap extends Record<string, unknown[]>> {
|
||||
|
|
@ -50,6 +52,7 @@ class EventManager<EventMap extends Record<string, unknown[]>> {
|
|||
|
||||
export const eventManager = new EventManager<{
|
||||
'user.login': [];
|
||||
'auth.login': [LoginResponseDto];
|
||||
'auth.logout': [];
|
||||
'language.change': [{ name: string; code: string; rtl?: boolean }];
|
||||
}>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue