Compare commits
2 Commits
243361ee80
...
22dc82e052
| Author | SHA1 | Date | |
|---|---|---|---|
| 22dc82e052 | |||
| 4bb2dff5ea |
@ -1,5 +1,5 @@
|
|||||||
database:
|
database:
|
||||||
host: localhost
|
host: localhost #when use docker change to "db"
|
||||||
port: 5432
|
port: 5432
|
||||||
user: postgres
|
user: postgres
|
||||||
password: root
|
password: root
|
||||||
|
|||||||
@ -73,7 +73,10 @@ func (tc *TrainingController) CreateTrainingRecord(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
c.JSON(http.StatusCreated, record)
|
c.JSON(http.StatusCreated, gin.H{
|
||||||
|
"message": "数据保存成功",
|
||||||
|
"id": record.TrainId,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func ReceiveTrainingData(c *gin.Context) {
|
func ReceiveTrainingData(c *gin.Context) {
|
||||||
|
|||||||
@ -4,7 +4,7 @@ services:
|
|||||||
app:
|
app:
|
||||||
build: .
|
build: .
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8180"
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@ -27,7 +27,7 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "127.0.0.1:5432:5432"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pgdata:
|
pgdata:
|
||||||
|
|||||||
Reference in New Issue
Block a user