Api Key role is now correcty added do middleware context
This commit is contained in:
+5
-2
@@ -1,9 +1,12 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"time"
|
||||
)
|
||||
|
||||
var ErrInvalidToken = errors.New("Invalid token")
|
||||
|
||||
type Token struct {
|
||||
Id int64
|
||||
AccountId int64 `xorm:"not null unique(uix_account_id_name)"`
|
||||
@@ -47,9 +50,9 @@ type GetTokensQuery struct {
|
||||
Result []*Token
|
||||
}
|
||||
|
||||
type GetAccountByTokenQuery struct {
|
||||
type GetTokenByTokenQuery struct {
|
||||
Token string
|
||||
Result *Account
|
||||
Result *Token
|
||||
}
|
||||
|
||||
// ------------------------
|
||||
|
||||
Reference in New Issue
Block a user