1234567891011121314151617181920212223242526272829 |
- package mobile_api_controllers
-
- import (
- "XT_New/enums"
- "XT_New/service"
- "fmt"
- )
-
- type QiNiuApiController struct {
- MobileBaseAPIAuthController
- }
-
- func (c *QiNiuApiController) GetQNUpToken() {
- redisClient := service.RedisClient()
- defer redisClient.Close()
-
- token, err := redisClient.Get("qn_token").Result()
- if err != nil {
- defer fmt.Println(err)
- c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeGetQiniuUpToken)
- return
- }
-
- c.ServeSuccessJSON(map[string]interface{}{
- "uptoken": token,
- })
- return
- }
|