mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-29 08:00:19 +01:00
Repo returns Created if a GET made the DB do something
This commit is contained in:
@@ -224,8 +224,11 @@ namespace Tgstation.Server.Host.Controllers
|
||||
using (var repo = await instanceManager.GetInstance(Instance).RepositoryManager.LoadRepository(cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
if (repo != null && await PopulateApi(api, repo, DatabaseContext, Instance, null, null, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
//user may have fucked with the repo without telling us, do what we can
|
||||
await DatabaseContext.Save(cancellationToken).ConfigureAwait(false);
|
||||
return StatusCode((int)HttpStatusCode.Created, api);
|
||||
}
|
||||
return Json(api);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user