enhance(response):优化操作成功时使用的响应方法。

This commit is contained in:
徐涛 2022-08-24 08:26:59 +08:00
parent 14ffd0e9fb
commit 72d8e938e0

View File

@ -56,8 +56,8 @@ func (r *Result) Unauthorized(msg string) {
}
// 简易操作成功信息
func (r *Result) Success(msg string) {
r.response(http.StatusOK, http.StatusOK, msg)
func (r *Result) Success(msg string, payloads ...map[string]interface{}) {
r.response(http.StatusOK, http.StatusOK, msg, payloads...)
}
// 数据成功创建