feat: Add option to use http basic auth for api routes
All checks were successful
Build Docker / Build Images (map[dockerfile:Dockerfile.hsd tag_suffix:-hsd target:hsd]) (push) Successful in 3m2s
Build Docker / Build Images (map[dockerfile:Dockerfile tag_suffix: target:default]) (push) Successful in 3m8s
Tests and Linting / Tests-Linting (3.11) (push) Successful in 3m12s
Tests and Linting / Tests-Linting (3.13) (push) Successful in 3m19s
Tests and Linting / Tests-Linting (3.10) (push) Successful in 3m24s
All checks were successful
Build Docker / Build Images (map[dockerfile:Dockerfile.hsd tag_suffix:-hsd target:hsd]) (push) Successful in 3m2s
Build Docker / Build Images (map[dockerfile:Dockerfile tag_suffix: target:default]) (push) Successful in 3m8s
Tests and Linting / Tests-Linting (3.11) (push) Successful in 3m12s
Tests and Linting / Tests-Linting (3.13) (push) Successful in 3m19s
Tests and Linting / Tests-Linting (3.10) (push) Successful in 3m24s
This shoudl make it easier to use curl to access info
This commit is contained in:
@@ -119,6 +119,8 @@ def check_account(cookie: str | None):
|
||||
return False
|
||||
|
||||
account = cookie.split(":")[0]
|
||||
if len(account) < 1:
|
||||
return False
|
||||
# Check if the account is valid
|
||||
info = hsw.getAccountInfo(account, 'default')
|
||||
if 'error' in info:
|
||||
@@ -1571,6 +1573,12 @@ def getMempoolBids():
|
||||
def rescan():
|
||||
try:
|
||||
response = hsw.walletRescan(0)
|
||||
if 'success' in response and response['success'] is False:
|
||||
return {
|
||||
"error": {
|
||||
"message": "Rescan already in progress"
|
||||
}
|
||||
}
|
||||
return response
|
||||
except Exception as e:
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user