mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
eslint
This commit is contained in:
1 parent
605f8fc65d
commit
741a9ac511
7 files changed
+8
-20
No files matched your search
@@ -312,6 +312,7 @@ async function load() {
|
|||||||
ui: {},
|
ui: {},
|
||||||
};
|
};
|
||||||
global.onDestory = [];
|
global.onDestory = [];
|
||||||
|
Error.stackTraceLimit = 50;
|
||||||
if (cluster.isMaster) {
|
if (cluster.isMaster) {
|
||||||
console.log(`Master ${process.pid} Starting`);
|
console.log(`Master ${process.pid} Starting`);
|
||||||
process.stdin.setEncoding('utf8');
|
process.stdin.setEncoding('utf8');
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
const { ObjectID } = require('bson');
|
|
||||||
const { MessageNotFoundError } = require('../error');
|
const { MessageNotFoundError } = require('../error');
|
||||||
const db = require('../service/db.js');
|
const db = require('../service/db.js');
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ const { ObjectID } = require('bson');
|
|||||||
const { STATUS_WAITING } = require('./builtin').STATUS;
|
const { STATUS_WAITING } = require('./builtin').STATUS;
|
||||||
const task = require('./task');
|
const task = require('./task');
|
||||||
const problem = require('./problem');
|
const problem = require('./problem');
|
||||||
const { RecordNotFoundError, PermissionError } = require('../error');
|
const { RecordNotFoundError } = require('../error');
|
||||||
const db = require('../service/db');
|
const db = require('../service/db');
|
||||||
|
|
||||||
const coll = db.collection('record');
|
const coll = db.collection('record');
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
const { defaults } = require('lodash');
|
const { defaults } = require('lodash');
|
||||||
const db = require('../service/db');
|
const db = require('../service/db');
|
||||||
const builtin = require('../model/builtin');
|
|
||||||
const discussion = require('../model/discussion');
|
|
||||||
const system = require('../model/system');
|
const system = require('../model/system');
|
||||||
const domain = require('../model/domain');
|
const domain = require('../model/domain');
|
||||||
const pwhash = require('../lib/hash.hydro');
|
const pwhash = require('../lib/hash.hydro');
|
||||||
@@ -9,16 +7,6 @@ const { udoc } = require('../interface');
|
|||||||
|
|
||||||
const collUser = db.collection('user');
|
const collUser = db.collection('user');
|
||||||
|
|
||||||
const allowFail = async (func, ...args) => {
|
|
||||||
let res;
|
|
||||||
try {
|
|
||||||
res = await func(...args);
|
|
||||||
} catch (e) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
};
|
|
||||||
|
|
||||||
async function run({ username, password } = {}) {
|
async function run({ username, password } = {}) {
|
||||||
const def = {
|
const def = {
|
||||||
PROBLEM_PER_PAGE: 100,
|
PROBLEM_PER_PAGE: 100,
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ class PasteCreateHandler extends Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function apply() {
|
async function apply() {
|
||||||
Route('/paste/create', module.exports.PasteCreateHandler);
|
Route('/paste/create', PasteCreateHandler);
|
||||||
Route('/paste/:docId', module.exports.PasteShowHandler);
|
Route('/paste/:docId', PasteShowHandler);
|
||||||
nav('/paste/create', 'pastebin', 'pastebin', PERM_LOGGEDIN);
|
nav('/paste/create', 'pastebin', 'pastebin', PERM_LOGGEDIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class WikiHandler extends Handler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function apply() {
|
async function apply() {
|
||||||
Route('/wiki/:name', module.exports.WikiHandler);
|
Route('/wiki/:name', WikiHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
global.Hydro.handler.wiki = module.exports = apply;
|
global.Hydro.handler.wiki = module.exports = apply;
|
||||||
+3
-3
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydro",
|
"name": "hydro",
|
||||||
"version": "2.0.1",
|
"version": "2.1.0",
|
||||||
"main": "hydro/development.js",
|
"main": "hydro/development.js",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
"author": "masnn",
|
"author": "masnn",
|
||||||
@@ -42,10 +42,10 @@
|
|||||||
},
|
},
|
||||||
"pkg": {
|
"pkg": {
|
||||||
"scripts": [
|
"scripts": [
|
||||||
".build/development.js"
|
".build/app.js"
|
||||||
],
|
],
|
||||||
"assets": [
|
"assets": [
|
||||||
".build/*"
|
".build/module/**"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user