mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fix typings import
This commit is contained in:
1 parent
5fad63a3e1
commit
cd9bfffcec
2 files changed
+5
-5
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
/* eslint-disable no-await-in-loop */
|
/* eslint-disable no-await-in-loop */
|
||||||
import {
|
import {
|
||||||
Rdoc, TestCase, Mdoc, Drrdoc, TrainingNode,
|
RecordDoc, TestCase, MessageDoc, DiscussionTailReplyDoc, TrainingNode,
|
||||||
} from 'hydrooj';
|
} from 'hydrooj';
|
||||||
import mongodb, { Db, Cursor } from 'mongodb';
|
import mongodb, { Db, Cursor } from 'mongodb';
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ const tasks = {
|
|||||||
processer: (reply) => {
|
processer: (reply) => {
|
||||||
const res = [];
|
const res = [];
|
||||||
for (const r of reply) {
|
for (const r of reply) {
|
||||||
const drrdoc: Drrdoc = {
|
const drrdoc: DiscussionTailReplyDoc = {
|
||||||
_id: r._id,
|
_id: r._id,
|
||||||
content: r.content,
|
content: r.content,
|
||||||
owner: r.owner_uid,
|
owner: r.owner_uid,
|
||||||
@@ -211,7 +211,7 @@ const tasks = {
|
|||||||
message: (c.judge_text || '') + (c.message || ''),
|
message: (c.judge_text || '') + (c.message || ''),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const rdoc: Rdoc = {
|
const rdoc: RecordDoc = {
|
||||||
_id: doc._id,
|
_id: doc._id,
|
||||||
status: doc.status,
|
status: doc.status,
|
||||||
score: doc.score,
|
score: doc.score,
|
||||||
@@ -365,7 +365,7 @@ async function message(src: Db, report: Function) {
|
|||||||
.toArray();
|
.toArray();
|
||||||
for (const doc of docs) {
|
for (const doc of docs) {
|
||||||
for (const msg of doc.reply) {
|
for (const msg of doc.reply) {
|
||||||
const mdoc: Mdoc = {
|
const mdoc: MessageDoc = {
|
||||||
_id: objid(msg.at),
|
_id: objid(msg.at),
|
||||||
from: msg.sender_uid,
|
from: msg.sender_uid,
|
||||||
to: msg.sender_uid === doc.sender_uid ? doc.sendee_uid : doc.sender_uid,
|
to: msg.sender_uid === doc.sender_uid ? doc.sendee_uid : doc.sender_uid,
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { BaseService } from 'hydrooj';
|
import { BaseService } from 'hydrooj';
|
||||||
import * as system from 'hydrooj/dist/model/system';
|
import * as system from 'hydrooj/dist/model/system';
|
||||||
|
import { Logger } from 'hydrooj/dist/logger';
|
||||||
import {
|
import {
|
||||||
Search, Ingest, QueryOptions, SuggestOptions, PushOptions,
|
Search, Ingest, QueryOptions, SuggestOptions, PushOptions,
|
||||||
} from 'sonic-channel';
|
} from 'sonic-channel';
|
||||||
import { Logger } from 'hydrooj/dist/logger';
|
|
||||||
|
|
||||||
const logger = new Logger('sonic');
|
const logger = new Logger('sonic');
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user