add admin finder render

This commit is contained in:
cyber-dream 2023-05-04 01:47:00 +03:00
parent be13dcd525
commit 7fe9660923

View File

@ -38,11 +38,16 @@ func (f *FinderApplication) Routes(routes *gin.RouterGroup) {
routes.GET("render", func(ctx *gin.Context) {
isMobileParam := ctx.Query("isMobile")
isMobile := isMobileParam == "true"
admin := true
if isMobile {
ctx.HTML(http.StatusOK, "finder/mobile-app.tmpl", f.Render(isMobile))
} else {
ctx.HTML(http.StatusOK, "finder/app.tmpl", f.Render(isMobile))
return
}
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) {