mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
update .npmignore
This commit is contained in:
1 parent
9efcdf9441
commit
9dd370fa72
4 files changed
+15
-39
No files matched your search
+12
-12
@@ -1,15 +1,15 @@
|
|||||||
node_modules
|
node_modules/
|
||||||
|
ui/
|
||||||
|
config.yaml
|
||||||
config.json
|
config.json
|
||||||
docker-compose.yml
|
.cache/
|
||||||
Dockerfile
|
*.cache
|
||||||
|
__*
|
||||||
|
*.log
|
||||||
|
*.hydro
|
||||||
|
locales
|
||||||
|
templates
|
||||||
|
wiki
|
||||||
.vscode
|
.vscode
|
||||||
.github
|
.github
|
||||||
public/
|
examples
|
||||||
templates
|
|
||||||
ui
|
|
||||||
locales
|
|
||||||
module
|
|
||||||
hydro
|
|
||||||
build
|
|
||||||
tool
|
|
||||||
.build/install.js
|
|
||||||
+2
-25
@@ -13,31 +13,10 @@ import {
|
|||||||
Route, Handler, Connection, ConnectionHandler, Types, param,
|
Route, Handler, Connection, ConnectionHandler, Types, param,
|
||||||
} from '../service/server';
|
} from '../service/server';
|
||||||
|
|
||||||
interface _PostJudgeBody {
|
async function _postJudge(rdoc: Rdoc) {
|
||||||
status: number,
|
|
||||||
domainId: string,
|
|
||||||
uid: number,
|
|
||||||
_id: ObjectID,
|
|
||||||
pid: number,
|
|
||||||
score: number,
|
|
||||||
rejudged: boolean,
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PostJudgeBodyContest extends _PostJudgeBody {
|
|
||||||
tid: ObjectID,
|
|
||||||
ttype: number,
|
|
||||||
}
|
|
||||||
|
|
||||||
type PostJudgeBody = _PostJudgeBody | PostJudgeBodyContest;
|
|
||||||
|
|
||||||
function _isWithContest(v: PostJudgeBody): v is PostJudgeBodyContest {
|
|
||||||
return !!((v as PostJudgeBodyContest).tid);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function _postJudge(rdoc: PostJudgeBody) {
|
|
||||||
const accept = rdoc.status === builtin.STATUS.STATUS_ACCEPTED;
|
const accept = rdoc.status === builtin.STATUS.STATUS_ACCEPTED;
|
||||||
const tasks = [];
|
const tasks = [];
|
||||||
if (_isWithContest(rdoc)) {
|
if (rdoc.tid) {
|
||||||
tasks.push(
|
tasks.push(
|
||||||
contest.updateStatus(
|
contest.updateStatus(
|
||||||
rdoc.domainId, rdoc.tid, rdoc.uid,
|
rdoc.domainId, rdoc.tid, rdoc.uid,
|
||||||
@@ -58,7 +37,6 @@ async function _postJudge(rdoc: PostJudgeBody) {
|
|||||||
|
|
||||||
export async function next(body: JudgeResultBody) {
|
export async function next(body: JudgeResultBody) {
|
||||||
if (body.rid) body.rid = new ObjectID(body.rid);
|
if (body.rid) body.rid = new ObjectID(body.rid);
|
||||||
if (body.tid) body.tid = new ObjectID(body.tid);
|
|
||||||
let rdoc = await record.get(body.domainId, body.rid);
|
let rdoc = await record.get(body.domainId, body.rid);
|
||||||
const $set: any = {};
|
const $set: any = {};
|
||||||
const $push: any = {};
|
const $push: any = {};
|
||||||
@@ -90,7 +68,6 @@ export async function next(body: JudgeResultBody) {
|
|||||||
|
|
||||||
export async function end(body: JudgeResultBody) {
|
export async function end(body: JudgeResultBody) {
|
||||||
if (body.rid) body.rid = new ObjectID(body.rid);
|
if (body.rid) body.rid = new ObjectID(body.rid);
|
||||||
if (body.tid) body.tid = new ObjectID(body.tid);
|
|
||||||
let rdoc = await record.get(body.domainId, body.rid);
|
let rdoc = await record.get(body.domainId, body.rid);
|
||||||
const $set: any = {};
|
const $set: any = {};
|
||||||
const $push: any = {};
|
const $push: any = {};
|
||||||
|
|||||||
@@ -203,7 +203,6 @@ export interface JudgeResultBody {
|
|||||||
domainId: string,
|
domainId: string,
|
||||||
rid: ObjectID,
|
rid: ObjectID,
|
||||||
judger?: number,
|
judger?: number,
|
||||||
tid?: ObjectID,
|
|
||||||
progress?: number
|
progress?: number
|
||||||
case?: {
|
case?: {
|
||||||
status: number,
|
status: number,
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "2.8.2",
|
"version": "2.8.5",
|
||||||
"main": "hydro/loader.ts",
|
"main": "hydro/loader.ts",
|
||||||
"repository": "https://github.com/hydro-dev/Hydro.git",
|
"repository": "https://github.com/hydro-dev/Hydro.git",
|
||||||
"author": "masnn",
|
"author": "masnn",
|
||||||
|
|||||||
Reference in new issue
Block a user