Compare commits

..

2 Commits

Author SHA1 Message Date
lly 22dc82e052 refactor: docker file. 2025-03-21 10:36:09 +08:00
lly 4bb2dff5ea refactor: return value. 2025-03-21 10:22:43 +08:00
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
database:
host: localhost
host: localhost #when use docker change to "db"
port: 5432
user: postgres
password: root
+4 -1
View File
@@ -73,7 +73,10 @@ func (tc *TrainingController) CreateTrainingRecord(c *gin.Context) {
return
}
c.JSON(http.StatusCreated, record)
c.JSON(http.StatusCreated, gin.H{
"message": "数据保存成功",
"id": record.TrainId,
})
}
func ReceiveTrainingData(c *gin.Context) {
+2 -2
View File
@@ -4,7 +4,7 @@ services:
app:
build: .
ports:
- "8080:8080"
- "8080:8180"
depends_on:
db:
condition: service_healthy
@@ -27,7 +27,7 @@ services:
timeout: 5s
retries: 5
ports:
- "5432:5432"
- "127.0.0.1:5432:5432"
volumes:
pgdata: