import { userActionTypes } from '../actionTypes' ; export const emailConfirmationInit = ( payload ) => ( { type : userActionTypes . EMAIL_CONFIRMATION_INIT , payload , } ) ; export const emailConfirmationSuccess = ( payload ) => ( { type : userActionTypes . EMAIL_CONFIRMATION_SUCCESS , payload , } ) ; export const emailConfirmationFailure = ( error ) => ( { type : userActionTypes . EMAIL_CONFIRMATION_FAILURE , error , } ) ; export const setDark = ( ) => ( { type : userActionTypes . SET_DARK , } ) ; export const resendEmailConfirmationInit = ( ) => ( { type : userActionTypes . RESEND_EMAIL_CONFIRMATION_INIT , } ) ; export const resendEmailConfirmationSuccess = ( payload ) => ( { type : userActionTypes . RESEND_EMAIL_CONFIRMATION_SUCCESS , payload , } ) ; export const resendEmailConfirmationFailure = ( error ) => ( { type : userActionTypes . RESEND_EMAIL_CONFIRMATION_FAILURE , error , } ) ; export const signUpInit = ( payload , history ) => ( { type : userActionTypes . SIGN_UP_INIT , payload , history , } ) ; export const signUpSuccess = ( payload , user ) => ( { type : userActionTypes . SIGN_UP_SUCCESS , payload , user , } ) ; export const signUpFailure = ( error ) => ( { type : userActionTypes . SIGN_UP_FAILURE , error , } ) ; export const fetchAutoAuthInit = ( ) => ( { type : userActionTypes . FETCH_AUTO_LOGIN , } ) ; export const fetchAuthAuthSuccess = ( payload ) => ( { type : userActionTypes . FETCH_AUTO_LOGIN_SUCCESS , payload , } ) ; export const fetchAuthAuthFailure = ( error ) => ( { type : userActionTypes . FETCH_AUTO_LOGIN_FAILURE , error , } ) ; export const logOutInit = ( history ) => ( { type : userActionTypes . LOG_OUT_INIT , history , } ) ; export const logOutSuccess = ( payload ) => ( { type : userActionTypes . LOG_OUT_SUCCESS , payload , } ) ; export const logOutFailure = ( error ) => ( { type : userActionTypes . LOG_OUT_FAILURE , error , } ) ; export const loginInit = ( payload , history ) => ( { type : userActionTypes . LOG_IN_INIT , payload , history , } ) ; export const loginSuccess = ( payload ) => ( { type : userActionTypes . LOG_IN_SUCCESS , payload , } ) ; export const loginFailure = ( error ) => ( { type : userActionTypes . LOG_IN_FAILURE , error , } ) ; export const getUser = ( ) => ( { type : userActionTypes . GET_USER , } ) ; export const getUserSuccess = ( payload ) => ( { type : userActionTypes . GET_USER_SUCCESS , payload , } ) ; export const getUserFailure = ( error ) => ( { type : userActionTypes . GET_USER_FAILURE , error , } ) ; export const getUserProfile = ( ) => ( { type : userActionTypes . GET_USER_PROFILE , } ) ; export const getUserProfileSuccess = ( payload ) => ( { type : userActionTypes . GET_USER_PROFILE_SUCCESS , payload , } ) ; export const getUserProfileFailure = ( error ) => ( { type : userActionTypes . GET_USER_PROFILE_FAILURE , error , } ) ; export const updateUserProfile = ( payload ) => ( { type : userActionTypes . UPDATE_USER_PROFILE , payload , } ) ; export const updateUserProfileSuccess = ( payload ) => ( { type : userActionTypes . UPDATE_USER_PROFILE_SUCCESS , payload , } ) ; export const updateUserProfileFailure = ( error ) => ( { type : userActionTypes . UPDATE_USER_PROFILE_FAILURE , error , } ) ; export const addUsername = ( data ) => ( { type : userActionTypes . ADD_USERNAME , data , } ) ; export const addEmail = ( data ) => ( { type : userActionTypes . ADD_EMAIL , data , } ) ; export const addPasswordConf = ( data ) => ( { type : userActionTypes . ADD_PASSWORD_CONF , data , } ) ; export const addPassword = ( data ) => ( { type : userActionTypes . ADD_PASSWORD , data , } ) ; export const initLogin = ( ) => ( { type : userActionTypes . INIT_LOGIN , } ) ; export const getProfileInit = ( data ) => ( { type : userActionTypes . GET_PROFILE_INIT , data , } ) ; export const getProfileSuccess = ( data ) => ( { type : userActionTypes . GET_PROFILE_SUCCESS , data , } ) ; export const getProfileFailure = ( err ) => ( { type : userActionTypes . GET_USER_PROFILE_FAILURE , err , } ) ; export const followUserInit = ( data , id ) => ( { type : userActionTypes . FOLLOW_USER_INIT , data , id , } ) ; export const followUserSuccess = ( payload , id ) => ( { type : userActionTypes . FOLLOW_USER_SUCCESS , payload , id , } ) ; export const followUserFailure = ( err ) => ( { type : userActionTypes . FOLLOW_USER_FAILURE , err , } ) ; export const unfollowUserInit = ( data , id ) => ( { type : userActionTypes . UNFOLLOW_USER_INIT , data , id , } ) ; export const unfollowUserSuccess = ( payload , id ) => ( { type : userActionTypes . UNFOLLOW_USER_SUCCESS , payload , id , } ) ; export const unfollowUserFailure = ( err ) => ( { type : userActionTypes . UNFOLLOW_USER_FAILURE , err , } ) ; export const initGetNotifications = ( payload ) => ( { type : userActionTypes . INIT_GET_NOTIFICATIONS , payload , } ) ; export const getNotificationsSuccess = ( payload ) => ( { type : userActionTypes . GET_NOTIFICATIONS_SUCCESS , payload , } ) ; export const getNotificationsFailure = ( err ) => ( { type : userActionTypes . GET_NOTIFICATIONS_FAILURE , err , } ) ; export const markAsReadInit = ( payload ) => ( { type : userActionTypes . MARK_AS_READ_INIT , payload , } ) ; export const markAsReadSuccess = ( payload , id ) => ( { type : userActionTypes . MARK_AS_READ_SUCCESS , payload , id , } ) ; export const markAsReadFailure = ( err ) => ( { type : userActionTypes . MARK_AS_READ_FAILURE , err , } ) ;