Skip to content

Commit f41ceae

Browse files
committed
Fix create server endpoint
1 parent b82e9fa commit f41ceae

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

src/BF2WebAdmin.Server/Controllers/ServerController.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,9 @@ public async Task<IActionResult> GetServer(string serverId)
8484
return Ok(result);
8585
}
8686

87-
[HttpPost("{serverId}")]
88-
public async Task<IActionResult> CreateServer(string serverId, [FromBody] Data.Entities.Server server)
87+
[HttpPost]
88+
public async Task<IActionResult> CreateServer([FromBody] Data.Entities.Server server)
8989
{
90-
if (serverId != server.ServerId)
91-
return BadRequest();
92-
9390
var serverEntity = server.Adapt<Data.Entities.Server>();
9491
await _socketServer.AddOrUpdateServerAsync(serverEntity);
9592
return Ok();

src/BF2WebAdmin.Server/Properties/launchSettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"commandName": "Project",
55
"dotnetRunMessages": true,
66
"launchBrowser": true,
7-
"applicationUrl": "http://localhost:5000",
7+
"applicationUrl": "http://localhost:5001",
88
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
9-
"launchUrl": "http://localhost:5000",
9+
"launchUrl": "http://localhost:5001",
1010
"environmentVariables": {
1111
"ASPNETCORE_ENVIRONMENT": "Development"
1212
}

0 commit comments

Comments
 (0)