From 4bb2dff5ea37cf78a71ab55b618fc6683d2aa7eb Mon Sep 17 00:00:00 2001 From: laoboli <1293528695@qq.com> Date: Fri, 21 Mar 2025 10:22:43 +0800 Subject: [PATCH] refactor: return value. --- controllers/train.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controllers/train.go b/controllers/train.go index cd73558..42429ff 100644 --- a/controllers/train.go +++ b/controllers/train.go @@ -73,7 +73,10 @@ func (tc *TrainingController) CreateTrainingRecord(c *gin.Context) { return } - c.JSON(http.StatusCreated, record) + c.JSON(http.StatusCreated, gin.H{ + "message": "Data saved successfully", + "id": record.TrainId, + }) } func ReceiveTrainingData(c *gin.Context) {