feature: operation and obs on transaction
parent
a4da5c100a
commit
1b309f8540
|
|
@ -134,6 +134,8 @@ func WixIntegration(c *fiber.Ctx) error {
|
||||||
PlanStartDate: data.Data.PlanStartDate,
|
PlanStartDate: data.Data.PlanStartDate,
|
||||||
PlanValidUntil: data.Data.PlanValidUntil,
|
PlanValidUntil: data.Data.PlanValidUntil,
|
||||||
PlanTitle: data.Data.PlanTitle,
|
PlanTitle: data.Data.PlanTitle,
|
||||||
|
Operation: "Compra",
|
||||||
|
Obs: "",
|
||||||
}
|
}
|
||||||
|
|
||||||
database.DB.Debug().Create(&transaction)
|
database.DB.Debug().Create(&transaction)
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,6 @@ type Transaction struct {
|
||||||
PlanStartDate string `gorm:"size:10" json:"planstartdate"`
|
PlanStartDate string `gorm:"size:10" json:"planstartdate"`
|
||||||
PlanValidUntil string `gorm:"size:10" json:"planvaliduntil"`
|
PlanValidUntil string `gorm:"size:10" json:"planvaliduntil"`
|
||||||
PlanTitle string `gorm:"size:40" json:"plantitle"`
|
PlanTitle string `gorm:"size:40" json:"plantitle"`
|
||||||
|
Operation string `gorm:"size:40" json:"operation"`
|
||||||
|
Obs string `gorm:"size:40" json:"obs"`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ func Setup(app *fiber.App) {
|
||||||
|
|
||||||
// Protected routes. Needs login before.
|
// Protected routes. Needs login before.
|
||||||
protected := app.Group("/")
|
protected := app.Group("/")
|
||||||
|
|
||||||
protected.Use(jwtware.New(jwtware.Config{
|
protected.Use(jwtware.New(jwtware.Config{
|
||||||
SigningKey: []byte(os.Getenv("API_SECRET")),
|
SigningKey: []byte(os.Getenv("API_SECRET")),
|
||||||
}))
|
}))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue