add admin finder render
This commit is contained in:
parent
be13dcd525
commit
7fe9660923
@ -38,11 +38,16 @@ func (f *FinderApplication) Routes(routes *gin.RouterGroup) {
|
|||||||
routes.GET("render", func(ctx *gin.Context) {
|
routes.GET("render", func(ctx *gin.Context) {
|
||||||
isMobileParam := ctx.Query("isMobile")
|
isMobileParam := ctx.Query("isMobile")
|
||||||
isMobile := isMobileParam == "true"
|
isMobile := isMobileParam == "true"
|
||||||
|
admin := true
|
||||||
if isMobile {
|
if isMobile {
|
||||||
ctx.HTML(http.StatusOK, "finder/mobile-app.tmpl", f.Render(isMobile))
|
ctx.HTML(http.StatusOK, "finder/mobile-app.tmpl", f.Render(isMobile))
|
||||||
} else {
|
return
|
||||||
ctx.HTML(http.StatusOK, "finder/app.tmpl", f.Render(isMobile))
|
|
||||||
}
|
}
|
||||||
|
if admin {
|
||||||
|
ctx.HTML(http.StatusOK, "finder/admin-app.tmpl", f.Render(isMobile))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ctx.HTML(http.StatusOK, "finder/app.tmpl", f.Render(isMobile))
|
||||||
|
|
||||||
})
|
})
|
||||||
routes.GET("renderMobileDesktop", func(ctx *gin.Context) {
|
routes.GET("renderMobileDesktop", func(ctx *gin.Context) {
|
||||||
|
Loading…
Reference in New Issue
Block a user