(c *gin.Context)
| 63 | } |
| 64 | |
| 65 | func GetToken(c *gin.Context) { |
| 66 | id, err := strconv.Atoi(c.Param("id")) |
| 67 | userId := c.GetInt("id") |
| 68 | if err != nil { |
| 69 | common.ApiError(c, err) |
| 70 | return |
| 71 | } |
| 72 | token, err := model.GetTokenByIds(id, userId) |
| 73 | if err != nil { |
| 74 | common.ApiError(c, err) |
| 75 | return |
| 76 | } |
| 77 | common.ApiSuccess(c, buildMaskedTokenResponse(token)) |
| 78 | } |
| 79 | |
| 80 | func GetTokenKey(c *gin.Context) { |
| 81 | id, err := strconv.Atoi(c.Param("id")) |