last demo import - cleaned

This commit is contained in:
ycc
2023-08-26 22:04:56 +02:00
parent 0ab5dd5e38
commit f3c3c67e2c
884 changed files with 301494 additions and 1 deletions

25
controllers/user.go Normal file
View File

@@ -0,0 +1,25 @@
package controllers
import (
beego "github.com/beego/beego/v2/server/web"
)
// UserController is the controller in chrage of solr
type UserController struct {
beego.Controller
}
// Prepare checks for logged in User
func (c *UserController) Prepare() {
login, _ := c.GetSession("login").(string)
if login == "" {
c.Ctx.Redirect(302, "/login")
}
}
// Get implements simple solr User
func (c *UserController) Get() {
c.Data["login"], _ = c.GetSession("login").(string)
c.TplName = "user.tpl"
}