| 1 | import 'package:dio/dio.dart'; |
| 2 | import 'package:error_or/error_or.dart'; |
| 3 | import 'package:openapi/openapi.dart'; |
| 4 | import 'package:plane_pal/constants/main.dart'; |
| 5 | |
| 6 | class AuthService { |
| 7 | final _authApi = openapi.getAuthenticationApi |
| 8 | |
| 9 | Future<ErrorOr<Response |
| 10 | try { |
| 11 | final response = ErrorOr. |
| 12 | return response; |
| 13 | } catch (e) { |
| 14 | return ErrorOr.error |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | Future<RegisterEntity?> register |
| 19 | return (await _authApi.authControllerRegisterV1 |
| 20 | registerDTO: body, |
| 21 | )) |
| 22 | .data; |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | final authService = AuthService(); |