core: support oauth bind/unbind account (#971)

Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
undefinedandpanda authored and GitHub committed 2025-04-01 10:55:21 +01:00
1 parent 1a8232899c
commit 536c697f4b
16 files changed
+393 -141

No files matched your search

+3 -6
View File
@@ -8,6 +8,7 @@ import type {
} from '@hydrooj/common/types';
import type { Context } from './context';
import type { DocStatusType } from './model/document';
import type { OauthMap } from './model/oauth';
import type { ProblemDoc } from './model/problem';
import type { Handler } from './service/server';
@@ -505,12 +506,7 @@ export interface OpCountDoc {
opcount: number;
}
export interface OauthMap {
/** source openId */
_id: string;
/** target uid */
uid: number;
}
export type { OauthMap } from './model/oauth';
export interface DiscussionHistoryDoc {
title?: string;
@@ -628,6 +624,7 @@ export interface UI {
export interface ModuleInterfaces {
oauth: {
text: string;
name: string;
icon?: string;
get: (this: Handler) => Promise<void>;
callback: (this: Handler, args: Record<string, any>) => Promise<OAuthUserResponse>;