Skip to content

Commit

Permalink
resolve houndci
Browse files Browse the repository at this point in the history
  • Loading branch information
Leticia Esiagu authored and Leticia Esiagu committed Mar 20, 2019
1 parent c52ae63 commit ded0e6f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@
"node_modules/*"
]
}
}
}
20 changes: 8 additions & 12 deletions server/controllers/follow-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,10 @@ export default class Follow {
if (!followers) {
return successResponse(res, 'you have no followers yet');
}
const followerArr = followers.map(current => {
return {
email: current.email,
username: current.username
};
});
const followerArr = followers.map(current => ({
email: current.email,
username: current.username
}));
return successResponse(res, {
message: ' Your followers',
Followers: followerArr
Expand Down Expand Up @@ -86,12 +84,10 @@ export default class Follow {
if (!following) {
return successResponse(res, 'you are not following anyone yet');
}
const followerArr = following.map(current => {
return {
email: current.email,
username: current.username
};
});
const followerArr = following.map(current => ({
email: current.email,
username: current.username
}));
return successResponse(res, {
message: ' Your are currently following',
following: followerArr
Expand Down
2 changes: 1 addition & 1 deletion server/migrations/20190319180606-create-bookmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
}
});
},
down: (queryInterface /* , Sequelize */) => {
down: queryInterface => {
return queryInterface.dropTable('bookmarks');
}
};
2 changes: 0 additions & 2 deletions server/models/User.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { hashPassword } from '../utils/helpers';
import models from './index';

const { Follower } = models;
module.exports = (sequelize, DataTypes) => {
const User = sequelize.define(
'User',
Expand Down

0 comments on commit ded0e6f

Please sign in to comment.