reorganize app files
This commit is contained in:
20
app/routes/settings.go
Normal file
20
app/routes/settings.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"proxmoxaas-dashboard/app/common"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func HandleGETSettings(c *gin.Context) {
|
||||
_, _, _, err := common.GetAuth(c)
|
||||
if err == nil {
|
||||
c.HTML(http.StatusOK, "html/settings.html", gin.H{
|
||||
"global": common.Global,
|
||||
"page": "settings",
|
||||
})
|
||||
} else {
|
||||
c.Redirect(http.StatusFound, "/login.html")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user