import { postActionTypes } from '../actionTypes' ; export const createPostInit = ( payload ) => ( { type : postActionTypes . CREATE_POST_INIT , payload , } ) ; export const createPostSuccess = ( payload ) => ( { type : postActionTypes . CREATE_POST_SUCCESS , payload , } ) ; export const createPostFailure = ( error ) => ( { type : postActionTypes . CREATE_POST_FAILURE , error , } ) ; export const getPostsInit = ( ) => ( { type : postActionTypes . GET_POSTS_INIT , } ) ; export const getPostsSuccess = ( payload ) => ( { type : postActionTypes . GET_POSTS_SUCCESS , payload , } ) ; export const getPostsFailure = ( error ) => ( { type : postActionTypes . GET_POSTS_FAILURE , error , } ) ; export const likePostInit = ( payload ) => ( { type : postActionTypes . LIKE_POST_INIT , payload , } ) ; export const likePostSuccess = ( payload ) => ( { type : postActionTypes . LIKE_POST_SUCCESS , payload , } ) ; export const likePostFailiure = ( error ) => ( { type : postActionTypes . LIKE_POST_FAILURE , error , } ) ; export const dislikePostInit = ( payload ) => ( { type : postActionTypes . DISLIKE_POST_INIT , payload , } ) ; export const dislikePostSuccess = ( payload ) => ( { type : postActionTypes . DISLIKE_POST_SUCCESS , payload , } ) ; export const dislikePostFailiure = ( error ) => ( { type : postActionTypes . DISLIKE_POST_FAILURE , error , } ) ; export const fetchPostInit = ( payload ) => ( { type : postActionTypes . FETCH_POST_INIT , payload , } ) ; export const fetchPostSuccess = ( payload ) => ( { type : postActionTypes . FETCH_POST_SUCCESS , payload , } ) ; export const fetchPostFailure = ( error ) => ( { type : postActionTypes . FETCH_POST_FAILURE , error , } ) ; export const deletePostInit = ( payload , userId ) => ( { type : postActionTypes . DELETE_POST_INIT , payload , userId , } ) ; export const deletePostSuccess = ( payload , id ) => ( { type : postActionTypes . DELETE_POST_SUCCESS , payload , id , } ) ; export const deletePostFailure = ( error ) => ( { type : postActionTypes . DELETE_POST_FAILURE , error , } ) ; export const postCommentInit = ( payload ) => ( { type : postActionTypes . POST_COMMENT_INIT , payload , } ) ; export const deleteCommentInit = ( payload , postId , userId ) => ( { type : postActionTypes . DELETE_COMMENT_INIT , payload , postId , userId , } ) ; export const deleteCommentSuccess = ( payload , id , postId ) => ( { type : postActionTypes . DELETE_COMMENT_SUCCESS , payload , id , postId , } ) ; export const deleteCommentFailure = ( error ) => ( { type : postActionTypes . DELETE_COMMENT_FAILURE , error , } ) ; export const postCommentSuccess = ( payload , id ) => ( { type : postActionTypes . POST_COMMENT_SUCCESS , payload , id , } ) ; export const postCommentFailure = ( error ) => ( { type : postActionTypes . POST_COMMENT_FAILURE , error , } ) ; export const addTitle = ( data ) => ( { type : postActionTypes . ADD_TITLE , data , } ) ; export const addContent = ( data ) => ( { type : postActionTypes . ADD_CONTENT , data , } ) ; export const notificationInit = ( ) => ( { type : postActionTypes . INIT_NOTIFICATION , } ) ; export const notificationSuccess = ( payload ) => ( { type : postActionTypes . NOTIFICATION_SUCCESS , payload , } ) ; export const notificationFailure = ( err ) => ( { type : postActionTypes . NOTIFICATION_FAILURE , err , } ) ; export const initCommentUpdates = ( ) => ( { type : postActionTypes . INIT_COMMENT_UPDATES , } ) ; export const commentUpdatesSuccess = ( payload ) => ( { type : postActionTypes . COMMENT_UPDATES_SUCCESS , payload , } ) ; export const commentUpdatesFailure = ( err ) => ( { type : postActionTypes . COMMENT_UPDATES_FAILURE , err , } ) ; export const editCommentInit = ( payload ) => ( { type : postActionTypes . EDIT_COMMENT_INIT , payload , } ) ; export const editCommentSuccess = ( payload ) => ( { type : postActionTypes . EDIT_COMMENT_SUCCESS , payload , } ) ; export const editCommentFailure = ( err ) => ( { type : postActionTypes . EDIT_COMMENT_FAILURE , err , } ) ; export const repostPostInit = ( payload , id ) => ( { type : postActionTypes . REPOST_POST_INIT , payload , id , } ) ; export const repostPostSuccess = ( payload ) => ( { type : postActionTypes . REPOST_POST_SUCCESS , payload , } ) ; export const repostPostFailure = ( error ) => ( { type : postActionTypes . REPOST_POST_FAILURE , error , } ) ; export const unrepostPostInit = ( payload , id ) => ( { type : postActionTypes . UNREPOST_POST_INIT , payload , id , } ) ; export const unrepostPostSuccess = ( payload ) => ( { type : postActionTypes . UNREPOST_POST_SUCCESS , payload , } ) ; export const unrepostPostFailure = ( error ) => ( { type : postActionTypes . UNREPOST_POST_FAILURE , error , } ) ; export const commentReplyInit = ( payload ) => ( { type : postActionTypes . COMMENT_REPLY_INIT , payload , } ) ; export const commentReplySuccess = ( payload ) => ( { type : postActionTypes . COMMENT_REPLY_SUCCESS , payload , } ) ; export const commentReplyFailure = ( error ) => ( { type : postActionTypes . COMMENT_REPLY_FAILURE , error , } ) ; export const deleteReplyInit = ( payload ) => ( { type : postActionTypes . REPLY_DELETE_INIT , payload , } ) ; export const deleteReplySuccess = ( payload ) => ( { type : postActionTypes . REPLY_DELETE_SUCCESS , payload , } ) ; export const deleteReplyFailure = ( payload ) => ( { type : postActionTypes . REPLY_DELETE_FAILURE , payload , } ) ; export const searchPostsInit = ( payload ) => ( { type : postActionTypes . SEARCH_POSTS_INIT , payload , } ) ; export const searchPostsSuccess = ( payload ) => ( { type : postActionTypes . SEARCH_POSTS_SUCCESS , payload , } ) ; export const searchPostsFailure = ( error ) => ( { type : postActionTypes . SEARCH_POSTS_FAILURE , error , } ) ; export const getSearchInit = ( payload ) => ( { type : postActionTypes . GET_SEARCH_INIT , payload , } ) ; export const getSearchSuccess = ( payload ) => ( { type : postActionTypes . GET_SEARCH_SUCCESS , payload , } ) ; export const getSearchFailure = ( error ) => ( { type : postActionTypes . GET_SEARCH_FAILURE , error , } ) ; export const setSelectedUser = ( payload ) => ( { type : postActionTypes . SET_SELECTED_USER , payload , } ) ; export const setMentionedUser = ( ) => ( { type : postActionTypes . SET_MENTIONED_USER , } ) ;