From 8cb2727cce6eaaff94df8f5dd2254da2b9870b24 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期六, 25 十一月 2023 17:30:05 +0800
Subject: [PATCH] 增加校验

---
 api/v1/report_work.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/api/v1/report_work.go b/api/v1/report_work.go
index 499423e..c8f05bb 100644
--- a/api/v1/report_work.go
+++ b/api/v1/report_work.go
@@ -28,7 +28,7 @@
 	err := service.AddReportWork(params)
 	if err != nil {
 		logx.Errorf("ReportWork err:%v", err)
-		ctx.Fail(ecode.DBErr)
+		ctx.FailWithMsg(ecode.ParamsErr, err.Error())
 		return
 	}
 	ctx.Ok()

--
Gitblit v1.8.0