mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
fix
This commit is contained in:
1 parent
29965f323b
commit
8ea50bfafb
2 files changed
+6
-11
No files matched your search
@@ -5,7 +5,7 @@ import {
|
||||
} from 'mongodb';
|
||||
import {
|
||||
Pdoc, Ddoc, Drdoc, Tdoc, TrainingDoc,
|
||||
ProblemStatusDoc, User, Content,
|
||||
ProblemStatusDoc, Content,
|
||||
} from '../interface';
|
||||
import { buildProjection } from '../utils';
|
||||
import { NumberKeys, ArrayKeys, Projection, MaybeArray } from '../typeutils';
|
||||
@@ -44,11 +44,6 @@ export interface DocStatusType {
|
||||
[key: number]: any
|
||||
}
|
||||
|
||||
export async function canView<T extends keyof DocType>(doc: DocType[T], user: User): Promise<boolean> {
|
||||
if (doc.owner === user._id || doc.maintainers.includes(user._id) || doc.participants.includes(user._id)) return true;
|
||||
if ()
|
||||
}
|
||||
|
||||
export async function add<T extends keyof DocType, K extends DocType[T]['docId']>(
|
||||
domainId: string, content: Content, owner: number,
|
||||
docType: T, docId: K,
|
||||
|
||||
Reference in new issue
Block a user