mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-03-11 17:24:09 +00:00
fix: Fix backblaze token validation
True if correct, false if incorrect, null if no connection
This commit is contained in:
parent
65f5d987e2
commit
54d8b04439
1 changed files with 1 additions and 4 deletions
|
@ -90,10 +90,7 @@ class BackblazeApi extends ApiMap {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
if (response.statusCode == HttpStatus.ok) {
|
if (response.statusCode == HttpStatus.ok) {
|
||||||
if (response.data['allowed']['capabilities'].contains('listBuckets')) {
|
isTokenValid = response.data['allowed']['capabilities'].contains('listBuckets');
|
||||||
isTokenValid = true;
|
|
||||||
}
|
|
||||||
isTokenValid = false;
|
|
||||||
} else if (response.statusCode == HttpStatus.unauthorized) {
|
} else if (response.statusCode == HttpStatus.unauthorized) {
|
||||||
isTokenValid = false;
|
isTokenValid = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue