From c8c91c1adab2b7f02d7eb6194961b5961d96a282 Mon Sep 17 00:00:00 2001 From: krawieck Date: Thu, 17 Sep 2020 18:37:27 +0200 Subject: [PATCH] Use token for post request --- lib/pages/full_post.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/pages/full_post.dart b/lib/pages/full_post.dart index 293f827..bbbc622 100644 --- a/lib/pages/full_post.dart +++ b/lib/pages/full_post.dart @@ -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