You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
466 B
25 lines
466 B
package http |
|
|
|
import ( |
|
"go-common/library/ecode" |
|
"go-common/library/log" |
|
bm "go-common/library/net/http/blademaster" |
|
) |
|
|
|
// Secret . |
|
func secret(c *bm.Context) { |
|
sappKey := c.Request.Form.Get("sappkey") |
|
if sappKey == "" { |
|
c.JSON(nil, ecode.RequestErr) |
|
log.Error("sappkey is empty") |
|
return |
|
} |
|
appSecret, err := openSvc.Secret(c, sappKey) |
|
if err != nil { |
|
c.JSON(nil, err) |
|
return |
|
} |
|
c.JSON(map[string]interface{}{ |
|
"app_secret": appSecret, |
|
}, err) |
|
}
|
|
|