This commit is contained in:
2024-10-12 23:49:59 +08:00
parent d520deacb3
commit 915d3f3716
37 changed files with 173 additions and 92 deletions

View File

@@ -45,6 +45,8 @@ func sendResponse(ctx context.Context, w http.ResponseWriter, code int, message
// 响应成功
func Success(ctx context.Context, w http.ResponseWriter, data interface{}) {
ctx = context.WithValue(ctx, "status", "success")
ctx = context.WithValue(ctx, "Charges", true)
sendResponse(ctx, w, 0, "success", data)
}