Use token for post request

This commit is contained in:
krawieck 2020-09-17 18:37:27 +02:00
parent c83d92f79d
commit c8c91c1ada
1 changed files with 4 additions and 2 deletions

View File

@ -25,8 +25,10 @@ class FullPostPage extends HookWidget {
@override
Widget build(BuildContext context) {
final fullPostSnap =
useMemoFuture(() => LemmyApi(instanceUrl).v1.getPost(id: id));
final accStore = useAccountsStore();
final fullPostSnap = useMemoFuture(() => LemmyApi(instanceUrl)
.v1
.getPost(id: id, auth: accStore.defaultTokenFor(instanceUrl)?.raw));
// FALLBACK VIEW