👽 Update API to microservices

♻️ Refactor router pushes
This commit is contained in:
2025-07-17 14:35:09 +08:00
parent a7454edec0
commit e6c58b7b63
109 changed files with 9156 additions and 344 deletions

View File

@@ -30,7 +30,10 @@ class PostListNotifier extends _$PostListNotifier
if (pubName != null) 'pub': pubName,
};
final response = await client.get('/posts', queryParameters: queryParams);
final response = await client.get(
'/sphere/posts',
queryParameters: queryParams,
);
final total = int.parse(response.headers.value('X-Total') ?? '0');
final List<dynamic> data = response.data;
final posts = data.map((json) => SnPost.fromJson(json)).toList();