aboutsummaryrefslogtreecommitdiff
path: root/garage.go
diff options
context:
space:
mode:
Diffstat (limited to 'garage.go')
-rw-r--r--garage.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/garage.go b/garage.go
index d3d4d38..b3ca836 100644
--- a/garage.go
+++ b/garage.go
@@ -194,9 +194,9 @@ func handleWebsiteList(w http.ResponseWriter, r *http.Request) {
return
}
- list := ctrl.List()
- if len(list) > 0 {
- http.Redirect(w, r, "/website/inspect/"+list[0].Pretty, http.StatusFound)
+ desc := ctrl.Describe()
+ if len(desc.Websites) > 0 {
+ http.Redirect(w, r, "/website/inspect/"+desc.Websites[0].Pretty, http.StatusFound)
} else {
http.Redirect(w, r, "/website/new", http.StatusFound)
}
@@ -271,7 +271,7 @@ func handleWebsiteInspect(w http.ResponseWriter, r *http.Request) {
action := strings.Join(r.Form["action"],"")
switch action {
case "increase_quota":
- _, processErr = ctrl.Patch(bucketName, &WebsitePatch { size: &user.Quota.WebsiteSizeBursted })
+ _, processErr = ctrl.Patch(bucketName, &WebsitePatch { Size: &user.Quota.WebsiteSizeBursted })
case "delete_bucket":
processErr = ctrl.Delete(bucketName)
http.Redirect(w, r, "/website", http.StatusFound)