diff --git a/src/GZCTF/ClientApp/src/Api.ts b/src/GZCTF/ClientApp/src/Api.ts index 77e934188..8785bf22d 100644 --- a/src/GZCTF/ClientApp/src/Api.ts +++ b/src/GZCTF/ClientApp/src/Api.ts @@ -4176,13 +4176,13 @@ export class Api extends HttpClient + gameParticipations: (id: number, params: RequestParams = {}) => this.request({ - path: `/api/game/${id}/participation`, + path: `/api/game/${id}/participations`, method: 'GET', format: 'json', ...params, @@ -4191,13 +4191,13 @@ export class Api extends HttpClient + useGameParticipations: (id: number, options?: SWRConfiguration, doFetch: boolean = true) => useSWR( - doFetch ? `/api/game/${id}/participation` : null, + doFetch ? `/api/game/${id}/participations` : null, options ), @@ -4205,15 +4205,15 @@ export class Api extends HttpClient, options?: MutatorOptions - ) => mutate(`/api/game/${id}/participation`, data, options), + ) => mutate(`/api/game/${id}/participations`, data, options), /** * @description 延长容器时间,需要User权限,且只能在到期前十分钟延期两小时 diff --git a/src/GZCTF/Controllers/GameController.cs b/src/GZCTF/Controllers/GameController.cs index 4b060a5d3..1bcaad8f9 100644 --- a/src/GZCTF/Controllers/GameController.cs +++ b/src/GZCTF/Controllers/GameController.cs @@ -546,7 +546,7 @@ public async Task ChallengesWithTeamInfo([FromRoute] int id, Canc [ProducesResponseType(typeof(ParticipationInfoModel[]), StatusCodes.Status200OK)] [ProducesResponseType(typeof(RequestResponse), StatusCodes.Status400BadRequest)] [ProducesResponseType(typeof(RequestResponse), StatusCodes.Status404NotFound)] - public async Task Participation([FromRoute] int id, CancellationToken token = default) + public async Task Participations([FromRoute] int id, CancellationToken token = default) { ContextInfo context = await GetContextInfo(id, token: token);