Skip to content

Commit

Permalink
feat: some more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
vinitkumar committed Jan 10, 2021
1 parent 3d19703 commit 813720f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/controllers/users.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/controllers/users.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/controllers/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports.authCallback = (req: CustomRequest, res: Response) => {
exports.login = (req: CustomRequest, res: Response) => {
let tweetCount: number, userCount: number, analyticsCount: number;
let options = {};
Analytics.list(options)
Analytics.statics.list(options)
.then(() => {
return Analytics.countDocuments();
})
Expand Down Expand Up @@ -120,7 +120,7 @@ exports.show = (req: CustomRequest, res: Response) => {
let followingCount = user.following.length;
let followerCount = user.followers.length;

Tweet.list(options)
Tweet.statics.list(options)
.then(function (result: any) {
tweets = result;
return Tweet.countUserTweets(reqUserId);
Expand Down Expand Up @@ -180,7 +180,7 @@ exports.delete = (req: CustomRequest, res: Response) => {
};

function showFollowers(req: CustomRequest, res: Response, type: string) {
let user = req.profile;
let user = req.profile as UserDocument;
let followers = user[type];
let followingCount = user.following.length;
let followerCount = user.followers.length;
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"sourceMap": true,
"outDir": "dist",
"skipLibCheck": true,
"strictNullChecks": true,
"baseUrl": ".",
"paths": {
"*": [
Expand Down

0 comments on commit 813720f

Please sign in to comment.