mirror of
https://github.com/aclindsa/moneygo.git
synced 2025-07-02 20:28:38 -04:00
Rebind all SQL queries to acommodate Postgres
This commit is contained in:
@ -14,8 +14,6 @@ type ResponseWriterWriter interface {
|
||||
Write(http.ResponseWriter) error
|
||||
}
|
||||
|
||||
type Tx = gorp.Transaction
|
||||
|
||||
type Context struct {
|
||||
Tx *Tx
|
||||
User *User
|
||||
@ -51,7 +49,7 @@ type APIHandler struct {
|
||||
}
|
||||
|
||||
func (ah *APIHandler) txWrapper(h Handler, r *http.Request, context *Context) (writer ResponseWriterWriter) {
|
||||
tx, err := ah.DB.Begin()
|
||||
tx, err := GetTx(ah.DB)
|
||||
if err != nil {
|
||||
log.Print(err)
|
||||
return NewError(999 /*Internal Error*/)
|
||||
|
Reference in New Issue
Block a user