chore: lint

This commit is contained in:
Paul Bienkowski 2020-11-25 21:30:31 +01:00
parent 4bfd55e110
commit 80b2169b15
3 changed files with 2 additions and 5 deletions

View file

@ -1,6 +1,5 @@
const mongoose = require('mongoose');
const uniqueValidator = require('mongoose-unique-validator');
const slug = require('slug');
const schema = new mongoose.Schema(
{

View file

@ -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) });
}),
);

View file

@ -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');