forked from eatvio/eatvio_app
fix: auth
This commit is contained in:
@@ -9,7 +9,7 @@ part 'auth_service.g.dart';
|
||||
abstract class AuthService {
|
||||
factory AuthService(Dio dio, {String? baseUrl}) = _AuthService;
|
||||
|
||||
@GET('/api/login')
|
||||
@POST('/api/login')
|
||||
Future<TokenModel> getTokenByCredentials({
|
||||
@Body() required CredentialsModel credentials,
|
||||
});
|
||||
|
||||
@@ -26,7 +26,7 @@ class _AuthService implements AuthService {
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = credentials;
|
||||
final _options = _setStreamType<TokenModel>(
|
||||
Options(method: 'GET', headers: _headers, extra: _extra)
|
||||
Options(method: 'POST', headers: _headers, extra: _extra)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/login',
|
||||
|
||||
Reference in New Issue
Block a user