From da5dfc05723d56fd92e9eca31c8e84bb33177dc5 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期一, 21 八月 2023 10:14:30 +0800
Subject: [PATCH] fix

---
 api/v1/timeSpent.go |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/api/v1/timeSpent.go b/api/v1/timeSpent.go
index 0960310..c22f776 100644
--- a/api/v1/timeSpent.go
+++ b/api/v1/timeSpent.go
@@ -71,6 +71,10 @@
 	if !ok {
 		return
 	}
+    if params.Id == 0 {
+        ctx.Fail(ecode.ParamsErr)
+    }
+    params.TimeSpent.Id = params.Id
 
 	errCode := service.NewTimeSpentService().UpdateTimeSpent(&params.TimeSpent)
 	if errCode != ecode.OK {

--
Gitblit v1.8.0