fix for Authorization header

pull/557/head
hunterlong 2020-05-01 17:19:54 -07:00
parent 2638ad379d
commit b4159359b2
2 changed files with 2 additions and 2 deletions

View File

@ -23,8 +23,7 @@ func findService(r *http.Request) (*services.Service, error) {
if err != nil {
return nil, err
}
user := IsUser(r)
if !servicer.Public.Bool && !user {
if !servicer.Public.Bool && !IsReadAuthenticated(r) {
return nil, errors.NotAuthenticated
}
return servicer, nil

View File

@ -53,6 +53,7 @@ func (c *Core) Create() error {
MigrationId: utils.Now().Unix(),
}
q := db.Create(&newCore)
utils.Log.Infof("API Key created: %s", secret)
return q.Error()
}