mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-05 09:36:41 +07:00
moved messages to separate reducer
This commit is contained in:
parent
bc09810802
commit
737a4396de
14 changed files with 212 additions and 153 deletions
|
@ -1,6 +1,6 @@
|
|||
import { AUTH_USER_ACTIONS } from '~/redux/auth/constants';
|
||||
import { IAuthState, ISocialProvider, IUser } from '~/redux/auth/types';
|
||||
import { IMessage, IOAuthEvent } from '../types';
|
||||
import { IOAuthEvent } from '../types';
|
||||
|
||||
export const userSendLoginRequest = ({
|
||||
username,
|
||||
|
@ -54,22 +54,6 @@ export const authSetProfile = (profile: Partial<IAuthState['profile']>) => ({
|
|||
profile,
|
||||
});
|
||||
|
||||
export const authGetMessages = (username: string) => ({
|
||||
type: AUTH_USER_ACTIONS.GET_MESSAGES,
|
||||
username,
|
||||
});
|
||||
|
||||
export const authSendMessage = (message: Partial<IMessage>, onSuccess) => ({
|
||||
type: AUTH_USER_ACTIONS.SEND_MESSAGE,
|
||||
message,
|
||||
onSuccess,
|
||||
});
|
||||
|
||||
export const authDeleteMessage = (id: IMessage['id']) => ({
|
||||
type: AUTH_USER_ACTIONS.DELETE_MESSAGE,
|
||||
id,
|
||||
});
|
||||
|
||||
export const authSetUpdates = (updates: Partial<IAuthState['updates']>) => ({
|
||||
type: AUTH_USER_ACTIONS.SET_UPDATES,
|
||||
updates,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue