Skip to content

Commit

Permalink
Fix invalid swagger definition
Browse files Browse the repository at this point in the history
  • Loading branch information
JensForstmann committed Oct 7, 2024
1 parent 86f01e2 commit 68e597d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion backend/src/gameServersController.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
import { Body, Controller, Delete, Get, Patch, Post, Route, Security } from '@tsoa/runtime';
import {
Body,
Controller,
Delete,
Get,
OperationId,
Patch,
Post,
Route,
Security,
} from '@tsoa/runtime';
import {
IManagedGameServer,
IManagedGameServerCreateDto,
Expand Down Expand Up @@ -63,6 +73,7 @@ export class GameServersController extends Controller {
* Execute a rcon command on the game server.
*/
@Post('{ip}/{port}')
@OperationId('GameServerRcon')
async rcon(ip: string, port: number, @Body() requestBody: string[]): Promise<string[] | void> {
const managedGameServers = ManagedGameServers.get(ip, port);
if (!managedGameServers) {
Expand Down
2 changes: 1 addition & 1 deletion backend/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -3079,7 +3079,7 @@
]
},
"post": {
"operationId": "Rcon",
"operationId": "GameServerRcon",
"responses": {
"200": {
"description": "Ok",
Expand Down

0 comments on commit 68e597d

Please sign in to comment.