@@ -29,7 +29,6 @@ export const getPost = (post_id) => async (dispatch) => {
29
29
dispatch ( { type : GET_POST , payload : res . data } ) ; // * this will fetch a single post given the post id
30
30
}
31
31
} catch ( err ) {
32
- console . log ( err . message ) ;
33
32
}
34
33
} ;
35
34
@@ -58,7 +57,6 @@ export const uploadPost = (post, post_id) => async (dispatch) => {
58
57
dispatch ( loadUser ( ) ) ;
59
58
}
60
59
} catch ( err ) {
61
- console . log ( err ) ;
62
60
}
63
61
} ;
64
62
@@ -69,7 +67,6 @@ export const uploadImage = (fData) => async (dispatch) => {
69
67
const res = await axios . post ( "/api/upload" , fData ) ;
70
68
dispatch ( { type : GET_POST_ID , payload : res . data . _id } ) ;
71
69
} catch ( err ) {
72
- console . log ( "Upload ERR: ->>" , err ) ;
73
70
}
74
71
} ;
75
72
@@ -80,7 +77,6 @@ export const getUserPosts = (user_id) => async (dispatch) => {
80
77
dispatch ( { type : GET_USER_POSTS , payload : res . data } ) ;
81
78
}
82
79
} catch ( err ) {
83
- console . log ( err ) ;
84
80
}
85
81
} ;
86
82
@@ -91,7 +87,6 @@ export const deletePost = (post_id) => async (dispatch) => {
91
87
dispatch ( { type : DELETE_POST , payload : res . data } ) ;
92
88
}
93
89
} catch ( err ) {
94
- console . log ( err ) ;
95
90
}
96
91
} ;
97
92
@@ -106,7 +101,6 @@ export const savePost = (post_id) => async (dispatch) => {
106
101
} , 5000 ) ;
107
102
}
108
103
} catch ( err ) {
109
- console . log ( err ) ;
110
104
}
111
105
} ;
112
106
@@ -115,7 +109,6 @@ export const getSavedPosts = () => async (dispatch) => {
115
109
const res = await axios . get ( "/api/save" ) ;
116
110
dispatch ( { type : GET_SAVED_POST , payload : res . data } ) ;
117
111
} catch ( err ) {
118
- console . log ( err ) ;
119
112
}
120
113
} ;
121
114
@@ -126,7 +119,6 @@ export const likePost = (post_id) => async (dispatch) => {
126
119
dispatch ( { type : LIKE_POST , payload : res . data } ) ;
127
120
}
128
121
} catch ( err ) {
129
- console . log ( err ) ;
130
122
}
131
123
} ;
132
124
@@ -137,7 +129,6 @@ export const getLikedPosts = (user, post_id) => async (dispatch) => {
137
129
dispatch ( { type : GET_LIKED_POST , payload : res . data } ) ;
138
130
}
139
131
} catch ( err ) {
140
- console . log ( err ) ;
141
132
}
142
133
} ;
143
134
@@ -146,7 +137,6 @@ export const reallyGetAllPosts = (userId) => async (dispatch) => {
146
137
const res = await axios . get ( `/api/post/real-all/${ userId } ` ) ;
147
138
dispatch ( { type : REALLY_GET_ALL_POSTS , payload : res . data } ) ;
148
139
} catch ( error ) {
149
- console . log ( error . message ) ;
150
140
}
151
141
} ;
152
142
@@ -161,9 +151,7 @@ export const cleanGetPostAction = () => (dispatch) => {
161
151
export const fetchPopularPosts = ( ) => async ( dispatch ) => {
162
152
try {
163
153
const res = await axios . get ( "/api/post/5fc4c6a6cf07d202383aadcf" ) ;
164
- console . log ( res . data ) ;
165
154
// dispatch({ type: , payload: res.data });
166
155
} catch ( err ) {
167
- console . log ( "Error Fetching All Articles" ) ;
168
156
}
169
157
} ;
0 commit comments