diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-04-16 00:08:23 -0400 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-04-16 00:08:23 -0400 |
| commit | 5782ae7c2bcbdf0026387ba4ac1fcba273930c1c (patch) | |
| tree | 5532ed3286a72dcc804b4e6c974f7b2fc688c3c3 /src/server | |
| parent | 67015ac6e2bf46457570797c80bfc1c03203bd8b (diff) | |
Changed config stuff to make compilation faster
Fixed linter errors
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/authentication/models/user_model.ts | 3 | ||||
| -rw-r--r-- | src/server/database.ts | 2 | ||||
| -rw-r--r-- | src/server/index.ts | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/src/server/authentication/models/user_model.ts b/src/server/authentication/models/user_model.ts index d5c84c311..ee85e1c05 100644 --- a/src/server/authentication/models/user_model.ts +++ b/src/server/authentication/models/user_model.ts @@ -85,8 +85,7 @@ userSchema.pre("save", function save(next) { }); const comparePassword: comparePasswordFunction = function (this: DashUserModel, candidatePassword, cb) { - bcrypt.compare(candidatePassword, this.password, (err: mongoose.Error, isMatch: boolean) => - cb(err, isMatch)); + bcrypt.compare(candidatePassword, this.password, cb); }; userSchema.methods.comparePassword = comparePassword; diff --git a/src/server/database.ts b/src/server/database.ts index 7914febf8..5457e4dd5 100644 --- a/src/server/database.ts +++ b/src/server/database.ts @@ -59,7 +59,7 @@ export class Database { public getDocument(id: string, fn: (result?: Transferable) => void, collectionName = Database.DocumentsCollection) { this.db && this.db.collection(collectionName).findOne({ id: id }, (err, result) => - fn(result ? ({ id: result._id, type: result.type, data: result.data }) : undefined)) + fn(result ? ({ id: result._id, type: result.type, data: result.data }) : undefined)); } public getDocuments(ids: string[], fn: (result: Transferable[]) => void, collectionName = Database.DocumentsCollection) { diff --git a/src/server/index.ts b/src/server/index.ts index 3cbe1ca76..70a7d266c 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -35,7 +35,7 @@ import c = require("crypto"); const MongoStore = require('connect-mongo')(session); const mongoose = require('mongoose'); -const download = (url: string, dest: fs.PathLike) => request.get(url).pipe(fs.createWriteStream(dest));; +const download = (url: string, dest: fs.PathLike) => request.get(url).pipe(fs.createWriteStream(dest)); const mongoUrl = 'mongodb://localhost:27017/Dash'; mongoose.connect(mongoUrl); |
