core: remove unused import

This commit is contained in:
undefined committed 2022-09-05 03:01:09 +08:00
1 parent 7fb5a9cae9
commit 0a4cd76a47
3 files changed
+11 -12

No files matched your search

-1
View File
@@ -4,7 +4,6 @@ import cac from 'cac';
import { ObjectID } from 'mongodb';
import { validate } from '../lib/validator';
import options from '../options';
import * as bus from '../service/bus';
import db from '../service/db';
import {
lib, model, script, service,
+10 -4
View File
@@ -517,7 +517,7 @@ export interface JudgeResultBody {
time?: number;
memory?: number;
message?: string | JudgeMessage;
compilerText?: string,
compilerText?: string;
}
export interface Task {
@@ -568,6 +568,13 @@ export interface OpCountDoc {
opcount: number;
}
export interface OauthMap {
/** source openId */
_id: string;
/** target uid */
uid: number;
}
export interface Collections {
'blacklist': BlacklistDoc;
'contest': Tdoc;
@@ -582,11 +589,11 @@ export interface Collections {
'user.preference': UserPreferenceDoc;
'vuser': VUdoc;
'user.group': GDoc;
'check': any;
'check': System;
'message': MessageDoc;
'token': TokenDoc;
'status': any;
'oauth': any;
'oauth': OauthMap;
'system': System;
'task': Task;
'storage': FileNode;
@@ -685,7 +692,6 @@ export interface HydroGlobal {
script: Record<string, Script>,
service: Service,
lib: Lib,
stat: any,
ui: UI,
error: typeof import('./error'),
Logger: typeof import('./logger').Logger,
+1 -7
View File
@@ -1,12 +1,6 @@
import { Collection } from 'mongodb';
import db from '../service/db';
interface OauthMap {
_id: string, // source openId
uid: number, // target uid
}
const coll: Collection<OauthMap> = db.collection('oauth');
const coll = db.collection('oauth');
class OauthModel {
static async get(_id: string) {