1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2025-07-01 12:08:37 -04:00

Reduxify CRUD actions for transactions

This commit is contained in:
2017-05-24 19:47:18 -04:00
parent 7f736812b3
commit 6762b3e721
11 changed files with 370 additions and 203 deletions

View File

@ -508,7 +508,12 @@ func TransactionHandler(w http.ResponseWriter, r *http.Request) {
return
}
WriteSuccess(w)
err = transaction.Write(w)
if err != nil {
WriteError(w, 999 /*Internal Error*/)
log.Print(err)
return
}
} else if r.Method == "GET" {
transactionid, err := GetURLID(r.URL.Path)
@ -590,7 +595,12 @@ func TransactionHandler(w http.ResponseWriter, r *http.Request) {
return
}
WriteSuccess(w)
err = transaction.Write(w)
if err != nil {
WriteError(w, 999 /*Internal Error*/)
log.Print(err)
return
}
} else if r.Method == "DELETE" {
transactionid, err := GetURLID(r.URL.Path)
if err != nil {