chore: lint
This commit is contained in:
parent
4bfd55e110
commit
80b2169b15
|
@ -1,6 +1,5 @@
|
|||
const mongoose = require('mongoose');
|
||||
const uniqueValidator = require('mongoose-unique-validator');
|
||||
const slug = require('slug');
|
||||
|
||||
const schema = new mongoose.Schema(
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ router.post(
|
|||
auth.required,
|
||||
wrapRoute(async (req, res) => {
|
||||
await req.user.follow(req.profile._id);
|
||||
return res.json({ profile: req.profile.toProfileJSONFor(user) });
|
||||
return res.json({ profile: req.profile.toProfileJSONFor(req.user) });
|
||||
}),
|
||||
);
|
||||
|
||||
|
@ -42,7 +42,7 @@ router.delete(
|
|||
auth.required,
|
||||
wrapRoute(async (req, res) => {
|
||||
await req.user.unfollow(req.profile._id);
|
||||
return res.json({ profile: req.profile.toProfileJSONFor(user) });
|
||||
return res.json({ profile: req.profile.toProfileJSONFor(req.user) });
|
||||
}),
|
||||
);
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
const mongoose = require('mongoose');
|
||||
const router = require('express').Router();
|
||||
const passport = require('passport');
|
||||
const User = mongoose.model('User');
|
||||
const wrapRoute = require('../../_helpers/wrapRoute');
|
||||
const auth = require('../auth');
|
||||
|
||||
|
|
Loading…
Reference in a new issue