Comparing version 2.13.21 to 2.13.22
@@ -36,5 +36,4 @@ "use strict"; | ||
'jwt', 'download', 'i18n', 'mail', 'useragent', | ||
'md5', 'misc', 'paginate', 'hash.hydro', 'rank', | ||
'crypto', 'misc', 'paginate', 'hash.hydro', 'rank', | ||
'validator', 'ui', 'sysinfo', 'testdata.convert.ini', 'testdataConfig', | ||
'logger', | ||
]; | ||
@@ -41,0 +40,0 @@ exports.builtinModel = [ |
@@ -429,3 +429,2 @@ "use strict"; | ||
const $update = { title, content }; | ||
console.log(this.request.body); | ||
if (this.request.body.pid) | ||
@@ -432,0 +431,0 @@ $update.pid = validator_1.checkPid(this.request.body.pid); |
@@ -427,3 +427,2 @@ /// <reference types="node" /> | ||
jwt: typeof import('./lib/jwt'); | ||
logger: typeof import('./lib/logger'); | ||
mail: typeof import('./lib/mail'); | ||
@@ -430,0 +429,0 @@ md5: typeof import('./lib/crypto').md5; |
@@ -32,2 +32,3 @@ "use strict"; | ||
const error_1 = require("../error"); | ||
const logger_1 = require("../logger"); | ||
const hash_hydro_1 = __importDefault(require("../lib/hash.hydro")); | ||
@@ -37,2 +38,3 @@ const db = __importStar(require("../service/db")); | ||
const coll = db.collection('user'); | ||
const logger = new logger_1.Logger('model/user'); | ||
async function setPassword(uid, password) { | ||
@@ -210,3 +212,3 @@ const salt = String.random(); | ||
catch (e) { | ||
console.log(e); | ||
logger.warn(e); | ||
throw new error_1.UserAlreadyExistError([uid, uname, mail]); | ||
@@ -213,0 +215,0 @@ } |
{ | ||
"name": "hydrooj", | ||
"version": "2.13.21", | ||
"version": "2.13.22", | ||
"bin": "bin/hydrooj.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/loader.js", |
@@ -13,5 +13,4 @@ /* eslint-disable no-await-in-loop */ | ||
'jwt', 'download', 'i18n', 'mail', 'useragent', | ||
'md5', 'misc', 'paginate', 'hash.hydro', 'rank', | ||
'crypto', 'misc', 'paginate', 'hash.hydro', 'rank', | ||
'validator', 'ui', 'sysinfo', 'testdata.convert.ini', 'testdataConfig', | ||
'logger', | ||
]; | ||
@@ -18,0 +17,0 @@ |
@@ -421,3 +421,2 @@ import { isSafeInteger, flatten } from 'lodash'; | ||
const $update: Partial<Pdoc> = { title, content }; | ||
console.log(this.request.body); | ||
if (this.request.body.pid) $update.pid = checkPid(this.request.body.pid); | ||
@@ -424,0 +423,0 @@ const pdoc = await problem.get(domainId, this.request.params.pid); |
@@ -501,3 +501,2 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
jwt: typeof import('./lib/jwt'), | ||
logger: typeof import('./lib/logger'), | ||
mail: typeof import('./lib/mail'), | ||
@@ -504,0 +503,0 @@ md5: typeof import('./lib/crypto').md5, |
@@ -10,2 +10,3 @@ import { Collection } from 'mongodb'; | ||
import { Value } from '../typeutils'; | ||
import { Logger } from '../logger'; | ||
import pwhash from '../lib/hash.hydro'; | ||
@@ -16,2 +17,3 @@ import * as db from '../service/db'; | ||
const coll: Collection<Udoc> = db.collection('user'); | ||
const logger = new Logger('model/user'); | ||
@@ -221,3 +223,3 @@ export async function setPassword(uid: number, password: string): Promise<Udoc> { | ||
} catch (e) { | ||
console.log(e); | ||
logger.warn(e); | ||
throw new UserAlreadyExistError([uid, uname, mail]); | ||
@@ -224,0 +226,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1706746
307
25709