1
- import raccoon from 'raccoon' ;
2
- import mongoose from 'mongoose' ;
1
+ // import mongoose from 'mongoose';
3
2
4
3
import Post from '../models/post.model' ;
5
4
import {
@@ -176,8 +175,10 @@ function list(req, res, next) {
176
175
* $ref: '#/responses/NotFound'
177
176
*/
178
177
179
- function recommendations ( req , res , next ) {
180
- const numberOfRecommendations = 10 ;
178
+ function recommendations ( req , res ) {
179
+ // const numberOfRecommendations = 10;
180
+ res . json ( [ ] ) ;
181
+ /*
181
182
raccoon
182
183
.recommendFor(req.user._id.toString(), numberOfRecommendations)
183
184
.then((recommendationsFound) => {
@@ -193,25 +194,30 @@ function recommendations(req, res, next) {
193
194
.catch((e) => {
194
195
next(e);
195
196
});
197
+ */
196
198
}
197
199
198
200
function upvote ( req , res , next ) {
201
+ /*
199
202
const userIdString = req.user._id.toString();
200
203
const postIdString = req.post._id.toString();
201
204
if (req.liked) {
202
- raccoon . liked ( userIdString , postIdString ) ;
205
+ // raccoon.liked(userIdString, postIdString);
203
206
} else if (req.unliked) {
204
- raccoon . unliked ( userIdString , postIdString ) ;
207
+ // raccoon.unliked(userIdString, postIdString);
205
208
}
209
+ */
206
210
next ( ) ;
207
211
}
208
212
209
213
function downvote ( req , res , next ) {
214
+ /*
210
215
if (req.undisliked) {
211
- raccoon . undisliked ( req . user . _id . toString ( ) , req . post . _id . toString ( ) ) ;
216
+ // raccoon.undisliked(req.user._id.toString(), req.post._id.toString());
212
217
} else if (req.disliked) {
213
- raccoon . disliked ( req . user . _id . toString ( ) , req . post . _id . toString ( ) ) ;
218
+ // raccoon.disliked(req.user._id.toString(), req.post._id.toString());
214
219
}
220
+ */
215
221
next ( ) ;
216
222
}
217
223
0 commit comments