mirror of
https://github.com/aclindsa/moneygo.git
synced 2025-07-12 07:51:08 -04:00
Stop using form elements for API
Just send the JSON as the request body
This commit is contained in:
@ -211,14 +211,8 @@ func ofxImportHelper(tx *Tx, r io.Reader, user *User, accountid int64) ResponseW
|
||||
}
|
||||
|
||||
func OFXImportHandler(context *Context, r *http.Request, user *User, accountid int64) ResponseWriterWriter {
|
||||
download_json := r.PostFormValue("ofxdownload")
|
||||
if download_json == "" {
|
||||
return NewError(3 /*Invalid Request*/)
|
||||
}
|
||||
|
||||
var ofxdownload OFXDownload
|
||||
err := ofxdownload.Read(download_json)
|
||||
if err != nil {
|
||||
if err := ReadJSON(r, &ofxdownload); err != nil {
|
||||
return NewError(3 /*Invalid Request*/)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user