mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-02-02 14:16:58 +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
|
@ -90,10 +90,7 @@ class BackblazeApi extends ApiMap {
|
|||
),
|
||||
);
|
||||
if (response.statusCode == HttpStatus.ok) {
|
||||
if (response.data['allowed']['capabilities'].contains('listBuckets')) {
|
||||
isTokenValid = true;
|
||||
}
|
||||
isTokenValid = false;
|
||||
isTokenValid = response.data['allowed']['capabilities'].contains('listBuckets');
|
||||
} else if (response.statusCode == HttpStatus.unauthorized) {
|
||||
isTokenValid = false;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue