Skip to content

Commit 38ae0b8

Browse files
rename date to created
1 parent 60cebcc commit 38ae0b8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

collections/CreateCollection.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import (
1414
)
1515

1616
func CreateCollection(c *gin.Context) {
17+
1718
var body map[string]interface{}
1819
if err := c.BindJSON(&body); err != nil {
1920
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid request body"})
@@ -52,8 +53,8 @@ func CreateCollection(c *gin.Context) {
5253
germanDate := now.Format("02.01.2006 15:04")
5354

5455
content := map[string]interface{}{
55-
"name": s,
56-
"date": germanDate,
56+
"name": s,
57+
"created": germanDate,
5758
}
5859

5960
if err := encoder.Encode(content); err != nil {

0 commit comments

Comments
 (0)