initial changes for API v2.0.0:
- added access manager api token to auth object - update account page to show pool based resource quotas - update config logic to use pool based resource quotas - minor improvements and cleanup
This commit is contained in:
+1
-10
@@ -2,7 +2,6 @@ package routes
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"proxmoxaas-dashboard/app/common"
|
||||
"time"
|
||||
@@ -39,8 +38,6 @@ func HandleGETBackups(c *gin.Context) {
|
||||
common.HandleNonFatalError(c, fmt.Errorf("error encountered getting instance config: %s", err.Error()))
|
||||
}
|
||||
|
||||
log.Printf("%+v", backups)
|
||||
|
||||
c.HTML(http.StatusOK, "html/backups.html", gin.H{
|
||||
"global": common.Global,
|
||||
"page": "backups",
|
||||
@@ -79,13 +76,7 @@ func HandleGETBackupsFragment(c *gin.Context) {
|
||||
func GetInstanceBackups(vm common.VMPath, auth common.Auth) ([]InstanceBackup, error) {
|
||||
backups := []InstanceBackup{}
|
||||
path := fmt.Sprintf("/cluster/%s/%s/%s/backup", vm.Node, vm.Type, vm.VMID)
|
||||
ctx := common.RequestContext{
|
||||
Cookies: map[string]string{
|
||||
"username": auth.Username,
|
||||
"PVEAuthCookie": auth.Token,
|
||||
"CSRFPreventionToken": auth.CSRF,
|
||||
},
|
||||
}
|
||||
ctx := common.GetRequestContextFromCookies(auth)
|
||||
body := []any{}
|
||||
res, code, err := common.RequestGetAPI(path, ctx, &body)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user