Add support for deleting a backup

This commit is contained in:
Dane Everitt
2020-04-09 22:07:48 -07:00
parent 33875105b6
commit 1c235025b7
2 changed files with 25 additions and 1 deletions

View File

@@ -49,7 +49,6 @@ func Configure() *gin.Engine {
server.POST("/commands", postServerCommands)
server.POST("/install", postServerInstall)
server.POST("/reinstall", postServerReinstall)
server.POST("/backup", postServerBackup)
// This archive request causes the archive to start being created
// this should only be triggered by the panel.
@@ -65,6 +64,12 @@ func Configure() *gin.Engine {
files.POST("/create-directory", postServerCreateDirectory)
files.POST("/delete", postServerDeleteFile)
}
backup := server.Group("/backup")
{
backup.POST("", postServerBackup)
backup.DELETE("/:backup", deleteServerBackup)
}
}
return router