mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: support oauth bind/unbind account (#971)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
1a8232899c
commit
536c697f4b
16 files changed
+393
-141
No files matched your search
@@ -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>;
|
||||
|
||||
Reference in new issue
Block a user