| 1 | import 'package:aero/constants/main.dart'; |
| 2 | |
| 3 | /// Flight push-alert endpoints. These aren't part of the generated OpenAPI |
| 4 | /// client, so they go through the shared authenticated Dio instance. |
| 5 | class AlertsService { |
| 6 | Future<void> subscribe |
| 7 | await openapi.dio.post( |
| 8 | '/v1/flight/$flightId/alerts', |
| 9 | data: {'playerId': playerId}, |
| 10 | ); |
| 11 | } |
| 12 | |
| 13 | Future<void> unsubscribe |
| 14 | await openapi.dio.delete( |
| 15 | '/v1/flight/$flightId/alerts', |
| 16 | data: {'playerId': playerId}, |
| 17 | ); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | final alertsService = AlertsService(); |