diff --git a/handlers.go b/handlers.go index 52cf78f..40601b1 100644 --- a/handlers.go +++ b/handlers.go @@ -84,13 +84,13 @@ func RecursiveZip(pathToZip, destinationPath string) error { func backup(c *gin.Context) { - err := RecursiveZip("/root/.wine/drive_c/users/root/AppData/LocalLow/Stunlock Studios/VRisingServer/Saves", "data/backup.zip") + err := RecursiveZip("/root/.wine/drive_c/users/root/AppData/LocalLow/Stunlock Studios/VRisingServer/Saves", "root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/backup.zip") if err != nil { c.String(http.StatusBadRequest, err.Error()) return } - backup, err := os.ReadFile("data/backup.zip") + backup, err := os.ReadFile("root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/backup.zip") if err != nil { c.String(http.StatusBadRequest, err.Error()) return @@ -102,22 +102,22 @@ func backup(c *gin.Context) { func configure(c *gin.Context) { file, err := c.FormFile("ServerHostSettings.json") if err == nil { - c.SaveUploadedFile(file, "data/ServerHostSettings.json") + c.SaveUploadedFile(file, "root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/ServerHostSettings.json") } file, err = c.FormFile("ServerGameSettings.json") if err == nil { - c.SaveUploadedFile(file, "data/ServerGameSettings.json") + c.SaveUploadedFile(file, "root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/ServerGameSettings.json") } file, err = c.FormFile("adminlist.txt") if err == nil { - c.SaveUploadedFile(file, "data/adminlist.txt") + c.SaveUploadedFile(file, "root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/adminlist.txt") } file, err = c.FormFile("banlist.txt") if err == nil { - c.SaveUploadedFile(file, "data/banlist.txt") + c.SaveUploadedFile(file, "root/.wine/drive_c/vrisingserver/VRisingServer_Data/StreamingAssets/Settings/banlist.txt") } updated_page, err := indexHTML.ReadFile("html/updated.html") diff --git a/html/index.html b/html/index.html index 946c61a..86bba94 100644 --- a/html/index.html +++ b/html/index.html @@ -571,7 +571,7 @@ update_button.disabled = false config_button.disabled = false update_button.innerText = "Update Game" - config_button.innerText = "Download Saves Backup" + config_button.innerText = "Upload Configuration" } } diff --git a/html/updated.html b/html/updated.html new file mode 100644 index 0000000..05c3901 --- /dev/null +++ b/html/updated.html @@ -0,0 +1,497 @@ + + + + Rod + + + + +
+

Config Successful

+ Go Back +
+ + \ No newline at end of file