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 416 B

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