添加服务器 & 展示服务器

This commit is contained in:
奶爸
2019-12-08 23:18:29 +08:00
parent d8c4364653
commit 1b18e7103e
13 changed files with 149 additions and 38 deletions

View File

@@ -26,7 +26,10 @@ func (cp *commonPage) home(c *gin.Context) {
if ok && isLogin.(bool) {
admin = dao.Admin
}
var servers []model.Server
dao.DB.Find(&servers)
c.HTML(http.StatusOK, "page/home", mygin.CommonEnvironment(c, gin.H{
"Admin": admin,
"Admin": admin,
"Servers": servers,
}))
}