mirror of
https://github.com/go-vikunja/app
synced 2024-06-02 18:49:47 +00:00
fixed otp login
This commit is contained in:
parent
fade6389ab
commit
1757464264
|
@ -143,7 +143,11 @@ class Client {
|
||||||
if (response.statusCode < 200 ||
|
if (response.statusCode < 200 ||
|
||||||
response.statusCode >= 400 ||
|
response.statusCode >= 400 ||
|
||||||
json == null) {
|
json == null) {
|
||||||
Map<String, dynamic> error = _decoder.convert(response.body);
|
Map<String, dynamic> error;
|
||||||
|
if(response.body is String)
|
||||||
|
error = _decoder.convert(response.body);
|
||||||
|
else
|
||||||
|
error = response.body;
|
||||||
if (response.statusCode ~/ 100 == 4) {
|
if (response.statusCode ~/ 100 == 4) {
|
||||||
throw new InvalidRequestApiException(
|
throw new InvalidRequestApiException(
|
||||||
response.statusCode,
|
response.statusCode,
|
||||||
|
|
|
@ -127,7 +127,7 @@ abstract class BucketService {
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class UserService {
|
abstract class UserService {
|
||||||
Future<UserTokenPair> login(String username, password, {bool rememberMe = false, String totp});
|
Future<UserTokenPair> login(String username, String password, {bool rememberMe = false, String totp});
|
||||||
Future<UserTokenPair> register(String username, email, password);
|
Future<UserTokenPair> register(String username, email, password);
|
||||||
Future<User> getCurrentUser();
|
Future<User> getCurrentUser();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user