update
parent
9b3f3fcc62
commit
d9232010fc
|
@ -51,6 +51,7 @@ func ApiCalQuery(c *gin.Context) {
|
|||
|
||||
func ApiCalNew(c *gin.Context) {
|
||||
cal := &Calendar{}
|
||||
cal.Creator = c.GetString(auth.GinUserKey)
|
||||
if err := c.ShouldBindJSON(cal); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ type Calendar struct {
|
|||
GroupName string `gorm:"-" json:"Group"`
|
||||
GroupID uint `gorm:"index:idx_cal,unique" json:"-"`
|
||||
|
||||
Creator string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue