fk
This commit is contained in:
@@ -21,13 +21,13 @@ type DjswController struct {
|
||||
|
||||
func (c *DjswController) handleMsg(isNeedDecode bool, handler func(*jdapi.API, interface{}) *jdapi.CallbackResponse) (callbackResponse *jdapi.CallbackResponse) {
|
||||
if callbackMsg, mapData, response := jdapi.GetCallbackMsg2(getUsefulRequest(c.Ctx)); response == nil {
|
||||
if jdAPI := jd.GetAPIByAppKey(callbackMsg.Token); jdAPI != nil {
|
||||
if jdAPI := jd.GetAPIByAppKey(callbackMsg.AppKey); jdAPI != nil {
|
||||
if response = jdAPI.CheckCallbackValidation2(mapData, callbackMsg.Sign); response == nil {
|
||||
callbackResponse = handler(jdAPI, callbackMsg.Param)
|
||||
}
|
||||
} else {
|
||||
callbackResponse = jdapi.Err2CallbackResponse(fmt.Errorf("没有匹配的token,非法请求"), "")
|
||||
globals.SugarLogger.Warnf("handleMsg failed, can not find api for:%s", callbackMsg.Token)
|
||||
globals.SugarLogger.Warnf("handleMsg failed, can not find api for:%s", callbackMsg.AppKey)
|
||||
}
|
||||
}
|
||||
return callbackResponse
|
||||
|
||||
Reference in New Issue
Block a user