mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: remove unused import
This commit is contained in:
1 parent
7fb5a9cae9
commit
0a4cd76a47
3 files changed
+11
-12
No files matched your search
@@ -4,7 +4,6 @@ import cac from 'cac';
|
|||||||
import { ObjectID } from 'mongodb';
|
import { ObjectID } from 'mongodb';
|
||||||
import { validate } from '../lib/validator';
|
import { validate } from '../lib/validator';
|
||||||
import options from '../options';
|
import options from '../options';
|
||||||
import * as bus from '../service/bus';
|
|
||||||
import db from '../service/db';
|
import db from '../service/db';
|
||||||
import {
|
import {
|
||||||
lib, model, script, service,
|
lib, model, script, service,
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ export interface JudgeResultBody {
|
|||||||
time?: number;
|
time?: number;
|
||||||
memory?: number;
|
memory?: number;
|
||||||
message?: string | JudgeMessage;
|
message?: string | JudgeMessage;
|
||||||
compilerText?: string,
|
compilerText?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Task {
|
export interface Task {
|
||||||
@@ -568,6 +568,13 @@ export interface OpCountDoc {
|
|||||||
opcount: number;
|
opcount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface OauthMap {
|
||||||
|
/** source openId */
|
||||||
|
_id: string;
|
||||||
|
/** target uid */
|
||||||
|
uid: number;
|
||||||
|
}
|
||||||
|
|
||||||
export interface Collections {
|
export interface Collections {
|
||||||
'blacklist': BlacklistDoc;
|
'blacklist': BlacklistDoc;
|
||||||
'contest': Tdoc;
|
'contest': Tdoc;
|
||||||
@@ -582,11 +589,11 @@ export interface Collections {
|
|||||||
'user.preference': UserPreferenceDoc;
|
'user.preference': UserPreferenceDoc;
|
||||||
'vuser': VUdoc;
|
'vuser': VUdoc;
|
||||||
'user.group': GDoc;
|
'user.group': GDoc;
|
||||||
'check': any;
|
'check': System;
|
||||||
'message': MessageDoc;
|
'message': MessageDoc;
|
||||||
'token': TokenDoc;
|
'token': TokenDoc;
|
||||||
'status': any;
|
'status': any;
|
||||||
'oauth': any;
|
'oauth': OauthMap;
|
||||||
'system': System;
|
'system': System;
|
||||||
'task': Task;
|
'task': Task;
|
||||||
'storage': FileNode;
|
'storage': FileNode;
|
||||||
@@ -685,7 +692,6 @@ export interface HydroGlobal {
|
|||||||
script: Record<string, Script>,
|
script: Record<string, Script>,
|
||||||
service: Service,
|
service: Service,
|
||||||
lib: Lib,
|
lib: Lib,
|
||||||
stat: any,
|
|
||||||
ui: UI,
|
ui: UI,
|
||||||
error: typeof import('./error'),
|
error: typeof import('./error'),
|
||||||
Logger: typeof import('./logger').Logger,
|
Logger: typeof import('./logger').Logger,
|
||||||
|
|||||||
@@ -1,12 +1,6 @@
|
|||||||
import { Collection } from 'mongodb';
|
|
||||||
import db from '../service/db';
|
import db from '../service/db';
|
||||||
|
|
||||||
interface OauthMap {
|
const coll = db.collection('oauth');
|
||||||
_id: string, // source openId
|
|
||||||
uid: number, // target uid
|
|
||||||
}
|
|
||||||
|
|
||||||
const coll: Collection<OauthMap> = db.collection('oauth');
|
|
||||||
|
|
||||||
class OauthModel {
|
class OauthModel {
|
||||||
static async get(_id: string) {
|
static async get(_id: string) {
|
||||||
|
|||||||
Reference in new issue
Block a user