feature: operation and obs on transaction

main
Nilo Roberto C Paim 2023-10-25 13:53:51 -03:00
parent a4da5c100a
commit 1b309f8540
3 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -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"`
} }

View File

@ -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")),
})) }))