Fix startup variables not being properly updated on server reboot; closes pterodactyl/panel#2255

This commit is contained in:
Dane Everitt
2020-08-27 21:08:33 -07:00
parent 711ee2258c
commit 7d8710824c
11 changed files with 119 additions and 51 deletions

View File

@@ -134,11 +134,13 @@ func patchServer(c *gin.Context) {
buf := bytes.Buffer{}
buf.ReadFrom(c.Request.Body)
if err := s.UpdateDataStructure(buf.Bytes(), true); err != nil {
if err := s.UpdateDataStructure(buf.Bytes()); err != nil {
TrackedServerError(err, s).AbortWithServerError(c)
return
}
s.SyncWithEnvironment()
c.Status(http.StatusNoContent)
}