2
0

template.go 763 B

123456789101112131415161718192021222324
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package dev
  5. import (
  6. "gogs.io/gogs/internal/conf"
  7. "gogs.io/gogs/internal/context"
  8. "gogs.io/gogs/internal/db"
  9. )
  10. func TemplatePreview(c *context.Context) {
  11. c.Data["User"] = db.User{Name: "Unknown"}
  12. c.Data["AppName"] = conf.App.BrandName
  13. c.Data["AppVersion"] = conf.App.Version
  14. c.Data["AppURL"] = conf.Server.ExternalURL
  15. c.Data["Code"] = "2014031910370000009fff6782aadb2162b4a997acb69d4400888e0b9274657374"
  16. c.Data["ActiveCodeLives"] = conf.Auth.ActivateCodeLives / 60
  17. c.Data["ResetPwdCodeLives"] = conf.Auth.ResetPasswordCodeLives / 60
  18. c.Data["CurDbValue"] = ""
  19. c.Success(c.Params("*"))
  20. }