You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
628 B
23 lines
628 B
import { Action } from 'redux'
|
|
|
|
export interface SetAuthenticatedAction extends Action {
|
|
type: 'AUTHENTICATION_SET_AUTHENTICATED'
|
|
payload: boolean
|
|
}
|
|
|
|
export interface SetUserAction extends Action {
|
|
type: 'AUTHENTICATION_SET_USER'
|
|
payload: string
|
|
}
|
|
|
|
export type AuthenticationActions = SetAuthenticatedAction | SetUserAction
|
|
|
|
export const setAuthenticated = (authenticated: boolean): SetAuthenticatedAction => ({
|
|
type: 'AUTHENTICATION_SET_AUTHENTICATED',
|
|
payload: authenticated,
|
|
})
|
|
|
|
export const setUser = (userId: string): SetUserAction => ({
|
|
type: 'AUTHENTICATION_SET_USER',
|
|
payload: userId,
|
|
})
|