You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

point.go 519 B

2 years ago
2 years ago
123456789101112131415161718192021
  1. package context
  2. import (
  3. "code.gitea.io/gitea/modules/setting"
  4. "code.gitea.io/gitea/services/reward/point/account"
  5. "gitea.com/macaron/macaron"
  6. )
  7. // PointAccount returns a macaron to get request user's point account
  8. func PointAccount() macaron.Handler {
  9. return func(ctx *Context) {
  10. a, err := account.GetAccount(ctx.User.ID)
  11. if err != nil {
  12. ctx.ServerError("GetPointAccount", err)
  13. return
  14. }
  15. ctx.Data["PointAccount"] = a
  16. ctx.Data["CloudBrainPaySwitch"] = setting.CloudBrainPaySwitch
  17. ctx.Next()
  18. }
  19. }