- 将美团配送门店相关的API单独拆分出来
- 去掉美团配送CheckCallbackValidation中的强制参数检查
This commit is contained in:
@@ -68,16 +68,14 @@ func (a *API) CheckCallbackValidation(request *http.Request) (callbackResponse *
|
||||
baseapi.SugarLogger.Infof("Signature is not ok, mine:%v, get:%v", sign, request.FormValue(signKey))
|
||||
return SignatureIsNotOk
|
||||
}
|
||||
|
||||
for _, valueKey := range []string{"delivery_id", "mt_peisong_id", "order_id"} {
|
||||
if request.FormValue(valueKey) == "" {
|
||||
baseapi.SugarLogger.Errorf("Missing mandatory param PostForm:%v, valueKey:%v", request.PostForm, valueKey)
|
||||
return &CallbackResponse{
|
||||
Code: -1,
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
// for _, valueKey := range []string{"delivery_id", "mt_peisong_id", "order_id"} {
|
||||
// if request.FormValue(valueKey) == "" {
|
||||
// baseapi.SugarLogger.Errorf("Missing mandatory param PostForm:%v, valueKey:%v", request.PostForm, valueKey)
|
||||
// return &CallbackResponse{
|
||||
// Code: -1,
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
return Err2CallbackResponse(err, "")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user