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