template.go 613 B

1234567891011121314151617181920
  1. package dev
  2. import (
  3. "gogs.io/gogs/internal/conf"
  4. "gogs.io/gogs/internal/context"
  5. "gogs.io/gogs/internal/database"
  6. )
  7. func TemplatePreview(c *context.Context) {
  8. c.Data["User"] = database.User{Name: "Unknown"}
  9. c.Data["AppName"] = conf.App.BrandName
  10. c.Data["AppVersion"] = conf.App.Version
  11. c.Data["AppURL"] = conf.Server.ExternalURL
  12. c.Data["Code"] = "2014031910370000009fff6782aadb2162b4a997acb69d4400888e0b9274657374"
  13. c.Data["ActiveCodeLives"] = conf.Auth.ActivateCodeLives / 60
  14. c.Data["ResetPwdCodeLives"] = conf.Auth.ResetPasswordCodeLives / 60
  15. c.Data["CurDbValue"] = ""
  16. c.Success(c.Params("*"))
  17. }