👽 Update service usage

This commit is contained in:
2025-09-17 00:48:01 +08:00
parent c64e1e208c
commit 313af28d7f
3 changed files with 5 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ class NotificationUnreadCountNotifier
try {
final client = ref.read(apiClientProvider);
final response = await client.get('/pusher/notifications/count');
final response = await client.get('/ring/notifications/count');
return (response.data as num).toInt();
} catch (_) {
return 0;
@@ -89,7 +89,7 @@ class NotificationListNotifier extends _$NotificationListNotifier
final queryParams = {'offset': offset, 'take': _pageSize};
final response = await client.get(
'/pusher/notifications',
'/ring/notifications',
queryParameters: queryParams,
);
final total = int.parse(response.headers.value('X-Total') ?? '0');
@@ -121,7 +121,7 @@ class NotificationScreen extends HookConsumerWidget {
Future<void> markAllRead() async {
showLoadingModal(context);
final apiClient = ref.watch(apiClientProvider);
await apiClient.post('/pusher/notifications/all/read');
await apiClient.post('/ring/notifications/all/read');
if (!context.mounted) return;
hideLoadingModal(context);
ref.invalidate(notificationListNotifierProvider);

View File

@@ -226,7 +226,7 @@ Future<void> _putTokenToRemote(
int provider,
) async {
await apiClient.put(
"/pusher/notifications/subscription",
"/ring/notifications/subscription",
data: {"provider": provider, "device_token": token},
);
}

View File

@@ -170,7 +170,7 @@ Future<void> _putTokenToRemote(
int provider,
) async {
await apiClient.put(
"/pusher/notifications/subscription",
"/ring/notifications/subscription",
data: {"provider": provider, "device_token": token},
);
}