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

handlers: Cleanup Context, route handling code

This commit is contained in:
2017-11-12 20:38:22 -05:00
parent 507868b7a5
commit e99abfe866
2 changed files with 29 additions and 21 deletions

View File

@ -348,10 +348,9 @@ func AccountImportHandler(context *Context, r *http.Request, user *User, account
}
func ImportHandler(r *http.Request, context *Context) ResponseWriterWriter {
current, remaining := NextLevel(context.Remaining)
if current != "gnucash" {
route := context.NextLevel()
if route != "gnucash" {
return NewError(3 /*Invalid Request*/)
}
context.Remaining = remaining
return GnucashImportHandler(r, context)
}