Use camelCase for json identifiers
This commit is contained in:
parent
1a1971246d
commit
8035403416
@ -22,8 +22,8 @@ type NewTransactionPayload struct {
|
||||
} `json:"category"`
|
||||
Memo string `json:"memo"`
|
||||
Amount string `json:"amount"`
|
||||
BudgetID uuid.UUID `json:"budget_id"`
|
||||
AccountID uuid.UUID `json:"account_id"`
|
||||
BudgetID uuid.UUID `json:"budgetId"`
|
||||
AccountID uuid.UUID `json:"accountId"`
|
||||
State string `json:"state"`
|
||||
}
|
||||
|
||||
@ -49,14 +49,14 @@ func (h *Handler) newTransaction(c *gin.Context) {
|
||||
return
|
||||
}*/
|
||||
|
||||
//if !transactionUUID.Valid {
|
||||
// if !transactionUUID.Valid {
|
||||
new := postgres.CreateTransactionParams{
|
||||
Memo: payload.Memo,
|
||||
Date: time.Time(payload.Date),
|
||||
Amount: amount,
|
||||
AccountID: payload.AccountID,
|
||||
PayeeID: payload.Payee.ID, //TODO handle new payee
|
||||
CategoryID: payload.Category.ID, //TODO handle new category
|
||||
PayeeID: payload.Payee.ID, // TODO handle new payee
|
||||
CategoryID: payload.Category.ID, // TODO handle new category
|
||||
Status: postgres.TransactionStatus(payload.State),
|
||||
}
|
||||
_, err = h.Service.CreateTransaction(c.Request.Context(), new)
|
||||
|
Loading…
x
Reference in New Issue
Block a user