feat: 复习总览改用范围入口并移除标签导图旧块
This commit is contained in:
+6
-1
@@ -80,7 +80,12 @@ export type RecallPage = { current: number; size: number; total: number; records
|
||||
export type RecallQuery = { pageNum: number; pageSize: number; status?: 'ACTIVE' | 'ENDED'; scopeType?: 'TASK' | 'TAG'; taskNum?: string; tags?: string[]; combineMode?: 'UNION' | 'INTERSECT' };
|
||||
const path = (recallNum: string) => `/review/recalls/${encodeURIComponent(recallNum)}`;
|
||||
export const createRecall = (body: CreateRecallRequest): Promise<ApiResponse<RecallDetail>> => request.post<RecallDetail>('/review/recalls', body);
|
||||
export const listRecalls = (query: RecallQuery): Promise<ApiResponse<RecallPage>> => request.get<RecallPage>('/review/recalls', query, { paramsSerializer: { indexes: null } });
|
||||
export const listRecalls = (
|
||||
query: RecallQuery,
|
||||
options: { silent?: boolean } = {},
|
||||
): Promise<ApiResponse<RecallPage>> => request.get<RecallPage>('/review/recalls', query, options.silent
|
||||
? { paramsSerializer: { indexes: null }, silent: true }
|
||||
: { paramsSerializer: { indexes: null } });
|
||||
export const getRecall = (num: string): Promise<ApiResponse<RecallDetail>> => request.get<RecallDetail>(path(num));
|
||||
export const resumeRecall = (num: string, body: ResumeRequest): Promise<ApiResponse<RecallDetail>> => request.post<RecallDetail>(`${path(num)}/resume`, body);
|
||||
export const saveRecallDraft = (num: string, body: SaveDraftRequest): Promise<ApiResponse<RecallDetail>> => request.put<RecallDetail>(`${path(num)}/draft`, body);
|
||||
|
||||
Reference in New Issue
Block a user