mirror of
https://github.com/ChuckNorrison/LightningTipBot.git
synced 2026-08-13 12:33:14 +02:00
fix api lookup
This commit is contained in:
parent
45931c087a
commit
32a5863b25
1 changed files with 1 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ func AuthorizationMiddleware(database *gorm.DB, authType AuthType, accessType Ac
|
|||
if accessType.Type == "admin" {
|
||||
tx = database.Where("wallet_adminkey = ? COLLATE NOCASE", password).First(user)
|
||||
} else if accessType.Type == "invoice" {
|
||||
tx = database.Where("wallet_inkey = ? COLLATE NOCASE", password).First(user)
|
||||
tx = database.Where("wallet_inkey = ? OR wallet_adminkey = ? COLLATE NOCASE", password, password).First(user)
|
||||
} else {
|
||||
log.Errorf("[api] route without access type")
|
||||
w.WriteHeader(401)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue