More progress on db schema setup and migrations, tricky stuff

This commit is contained in:
Torkel Ödegaard
2015-01-18 13:08:59 +01:00
parent 38f237efcb
commit 68a77c4051
9 changed files with 146 additions and 40 deletions
+2 -4
View File
@@ -8,9 +8,8 @@ import (
func GetAccount(c *middleware.Context) {
query := m.GetAccountInfoQuery{Id: c.AccountId}
err := bus.Dispatch(&query)
if err != nil {
if err := bus.Dispatch(&query); err != nil {
c.JsonApiErr(500, "Failed to fetch collaboratos", err)
return
}
@@ -31,9 +30,8 @@ func UpdateAccount(c *middleware.Context, cmd m.UpdateAccountCommand) {
func GetOtherAccounts(c *middleware.Context) {
query := m.GetOtherAccountsQuery{AccountId: c.AccountId}
err := bus.Dispatch(&query)
if err != nil {
if err := bus.Dispatch(&query); err != nil {
c.JsonApiErr(500, "Failed to get other accounts", err)
return
}