Load tag bookmarks by tag id

This commit is contained in:
Juan Gilsanz Polo
2024-02-25 00:39:27 +01:00
parent ee00de2582
commit 58f5b90da5
7 changed files with 247 additions and 38 deletions

View File

@@ -121,4 +121,17 @@ class ApiClientService {
return const ApiResponse(successful: false);
}
}
Future<ApiResponse<Tag>> fetchTagById(String tagId) async {
try {
final response = await dioInstance.get("/tags/$tagId/");
return ApiResponse(
successful: true,
content: Tag.fromJson(response.data),
);
} catch (e, stackTrace) {
Sentry.captureException(e, stackTrace: stackTrace);
return const ApiResponse(successful: false);
}
}
}