add roles
This commit is contained in:
parent
8ca089ecfb
commit
b48a610e90
2 changed files with 20 additions and 19 deletions
|
@ -38,6 +38,8 @@ type User struct {
|
|||
Email string `json:"email"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
HashedApiKey string `json:"hashed_api_key"`
|
||||
Role string `json:"role" gorm:"default:'free'"` // free, pro, pro+, admin
|
||||
SubscriptionExpiresAt time.Time `json:"subscription_expires_at"`
|
||||
}
|
||||
|
||||
type AvatarDecorationData struct {
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
package types
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
@ -37,7 +36,7 @@ func (e *StereoError) Throw(c *gin.Context, err error) {
|
|||
if err != nil {
|
||||
c.Error(err)
|
||||
} else {
|
||||
c.Error(errors.New(fmt.Sprintf("Got an error with code: %v", e.Code)))
|
||||
c.Error(fmt.Errorf("got an error with code: %v", e.Code))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue