Skip to content

Commit

Permalink
fix: api type error
Browse files Browse the repository at this point in the history
  • Loading branch information
GZTimeWalker committed Sep 10, 2023
1 parent 3465436 commit e615866
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions src/GZCTF/ClientApp/src/Api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4176,13 +4176,13 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
* @description 获取比赛的全部题目参与信息,需要Admin权限
*
* @tags Game
* @name GameParticipation
* @name GameParticipations
* @summary 获取全部比赛参与信息
* @request GET:/api/game/{id}/participation
* @request GET:/api/game/{id}/participations
*/
gameParticipation: (id: number, params: RequestParams = {}) =>
gameParticipations: (id: number, params: RequestParams = {}) =>
this.request<ParticipationInfoModel[], RequestResponse>({
path: `/api/game/${id}/participation`,
path: `/api/game/${id}/participations`,
method: 'GET',
format: 'json',
...params,
Expand All @@ -4191,29 +4191,29 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
* @description 获取比赛的全部题目参与信息,需要Admin权限
*
* @tags Game
* @name GameParticipation
* @name GameParticipations
* @summary 获取全部比赛参与信息
* @request GET:/api/game/{id}/participation
* @request GET:/api/game/{id}/participations
*/
useGameParticipation: (id: number, options?: SWRConfiguration, doFetch: boolean = true) =>
useGameParticipations: (id: number, options?: SWRConfiguration, doFetch: boolean = true) =>
useSWR<ParticipationInfoModel[], RequestResponse>(
doFetch ? `/api/game/${id}/participation` : null,
doFetch ? `/api/game/${id}/participations` : null,
options
),

/**
* @description 获取比赛的全部题目参与信息,需要Admin权限
*
* @tags Game
* @name GameParticipation
* @name GameParticipations
* @summary 获取全部比赛参与信息
* @request GET:/api/game/{id}/participation
* @request GET:/api/game/{id}/participations
*/
mutateGameParticipation: (
mutateGameParticipations: (
id: number,
data?: ParticipationInfoModel[] | Promise<ParticipationInfoModel[]>,
options?: MutatorOptions
) => mutate<ParticipationInfoModel[]>(`/api/game/${id}/participation`, data, options),
) => mutate<ParticipationInfoModel[]>(`/api/game/${id}/participations`, data, options),

/**
* @description 延长容器时间,需要User权限,且只能在到期前十分钟延期两小时
Expand Down
2 changes: 1 addition & 1 deletion src/GZCTF/Controllers/GameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ public async Task<IActionResult> ChallengesWithTeamInfo([FromRoute] int id, Canc
[ProducesResponseType(typeof(ParticipationInfoModel[]), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(RequestResponse), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(RequestResponse), StatusCodes.Status404NotFound)]
public async Task<IActionResult> Participation([FromRoute] int id, CancellationToken token = default)
public async Task<IActionResult> Participations([FromRoute] int id, CancellationToken token = default)
{
ContextInfo context = await GetContextInfo(id, token: token);

Expand Down

0 comments on commit e615866

Please sign in to comment.