Backend can now generate config.js, the very basic stuff, more work needed

This commit is contained in:
Torkel Ödegaard
2014-12-18 15:41:38 +01:00
parent ce947d4793
commit d69258e28f
6 changed files with 79 additions and 49 deletions

View File

@ -1,7 +1,6 @@
package api
import (
"github.com/gin-gonic/gin"
"github.com/torkelo/grafana-pro/pkg/api/dtos"
"github.com/torkelo/grafana-pro/pkg/middleware"
"github.com/torkelo/grafana-pro/pkg/models"
@ -96,7 +95,7 @@ func SetUsingAccount(c *middleware.Context) {
otherAccounts, err := models.GetOtherAccountsFor(c.UserAccount.Id)
if err != nil {
c.JSON(500, gin.H{"message": err.Error()})
c.JSON(500, utils.DynMap{"message": err.Error()})
return
}
@ -116,7 +115,7 @@ func SetUsingAccount(c *middleware.Context) {
account.UsingAccountId = usingAccountId
err = models.SaveAccount(account)
if err != nil {
c.JSON(500, gin.H{"message": err.Error()})
c.JSON(500, utils.DynMap{"message": err.Error()})
return
}