fmt
the build failed Details

This commit is contained in:
konrad 2018-03-06 13:43:07 +01:00 committed by kolaente
parent 0763ae07b0
commit 5fbc08cf65
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
4 changed files with 7 additions and 8 deletions

View File

@ -5,7 +5,7 @@ type ActionType int
// Define action types
const (
ActionTypeUnknown ActionType = -1
ActionTypeUnknown ActionType = -1
ActionTypeBookAdded ActionType = iota
ActionTypeBookUpdated
ActionTypeBookDeleted
@ -28,4 +28,4 @@ const (
func logAction(actionType ActionType, user *User, itemID int64) (err error) {
_, err = x.Insert(UserLog{Log: actionType, UserID: user.ID, ItemID: itemID})
return
}
}

View File

@ -63,7 +63,7 @@ func SetEngine() (err error) {
if total < 1 {
Config.FirstUser.IsAdmin = true // Make the first user admin
_, err = CreateUser(Config.FirstUser, &User{ID:0})
_, err = CreateUser(Config.FirstUser, &User{ID: 0})
if err != nil {
return err
}

View File

@ -26,11 +26,11 @@ type User struct {
// UserLog logs user actions
type UserLog struct {
ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id"`
UserID int64 `xorm:"int(11)" json:"userID"`
ID int64 `xorm:"int(11) autoincr not null unique pk" json:"id"`
UserID int64 `xorm:"int(11)" json:"userID"`
Log ActionType `xorm:"int(11)" json:"log"`
ItemID int64 `xorm:"int(11)" json:"itemID"`
Time int64 `xorm:"created" json:"time"`
ItemID int64 `xorm:"int(11)" json:"itemID"`
Time int64 `xorm:"created" json:"time"`
}
// TableName returns the table name for users

View File

@ -84,6 +84,5 @@ func PublisherAddOrUpdate(c echo.Context) error {
}
}*/
return c.JSON(http.StatusOK, newPublisher)
}