Account profile page

This commit is contained in:
2024-07-26 16:53:05 +08:00
parent 6e3d0f9787
commit 277ba69513
10 changed files with 291 additions and 48 deletions

View File

@ -45,12 +45,13 @@ class PostProvider extends GetConnect {
}
Future<Response> listPost(int page,
{int? realm, String? tag, category}) async {
{int? realm, String? author, tag, category}) async {
final queries = [
'take=${10}',
'offset=$page',
if (tag != null) 'tag=$tag',
if (category != null) 'category=$category',
if (author != null) 'author=$author',
if (realm != null) 'realmId=$realm',
];
final resp = await get('/posts?${queries.join('&')}');