diff --git a/services/webui/src/app/store/actions.ts b/services/webui/src/app/store/actions.ts index 138e37d..5742101 100644 --- a/services/webui/src/app/store/actions.ts +++ b/services/webui/src/app/store/actions.ts @@ -31,6 +31,7 @@ export enum Action { AuthLogin = "AUTH_LOGIN", AuthForget = "AUHT_FORGET", AuthLoad = "AUTH_LOAD", + AuthVerify = "AUTH_VERIFY", // Movies Methods ActiveMovieRequests = "ACTIVE_MOVIE_REQUESTS", @@ -45,6 +46,7 @@ export enum Action { */ export type ActionsTypes = { // RESTful Generics + // @TODO These shouldn't be actions as they pollute the logs [Action.Fetch] : (payload: IGetPayload) => Promise, [Action.Get] : (payload: IGetPayload) => Promise, [Action.Post] : (payload: IPostPayload) => Promise, @@ -55,7 +57,8 @@ export type ActionsTypes = { [Action.AuthRegister]: (payload: IRegisterPayload) => Promise, [Action.AuthLogin] : (payload: ILoginPayload) => Promise, [Action.AuthForget] : () => void, - [Action.AuthLoad] : () => boolean, + [Action.AuthLoad] : () => void, + [Action.AuthVerify] : () => void, // Movie Methods [Action.ActiveMovieRequests]: () => Promise<[number, IApiDataResponse]>, @@ -184,7 +187,7 @@ export const actions: Actions = { name : user.name, isAdmin: user.isAdmin, token : token - } + }; } catch(e) { return false; } diff --git a/services/webui/src/app/store/state.ts b/services/webui/src/app/store/state.ts index f4efad0..a809a08 100644 --- a/services/webui/src/app/store/state.ts +++ b/services/webui/src/app/store/state.ts @@ -6,7 +6,7 @@ import Modal from "../components/modals"; * The state definition */ export interface IState { - movies : { + movies: { [tmdbId: string]: { refCount: number, movie: IMovie