template.go 528 B

123456789101112131415161718192021
  1. package dev
  2. import (
  3. "gitote/gitote/models"
  4. "gitote/gitote/pkg/context"
  5. "gitote/gitote/pkg/setting"
  6. )
  7. func TemplatePreview(c *context.Context) {
  8. c.Data["User"] = models.User{Name: "Yoginth"}
  9. c.Data["AppVer"] = setting.AppVer
  10. c.Data["APIVer"] = setting.APIVer
  11. c.Data["AppURL"] = setting.AppURL
  12. c.Data["Code"] = "123456789"
  13. c.Data["ActiveCodeLives"] = setting.Service.ActiveCodeLives / 60
  14. c.Data["ResetPwdCodeLives"] = setting.Service.ResetPwdCodeLives / 60
  15. c.Data["CurDbValue"] = ""
  16. c.HTML(200, (c.Params("*")))
  17. }