From 3ac2a4524467734eb4ffff75e8a047084cba6d62 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 27 Dec 2022 01:17:04 +0800 Subject: [PATCH] Got trolled by @neet --- src/components/status.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/status.jsx b/src/components/status.jsx index 7651f03e..a1e4dddc 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -953,7 +953,7 @@ function Poll({ poll, readOnly, onUpdate = () => {} }) { setUIState('loading'); (async () => { try { - const pollResponse = await masto.v1.poll.fetch(id); + const pollResponse = await masto.v1.polls.fetch(id); onUpdate(pollResponse); } catch (e) { // Silent fail @@ -1038,7 +1038,7 @@ function Poll({ poll, readOnly, onUpdate = () => {} }) { }); console.log(votes); setUIState('loading'); - const pollResponse = await masto.v1.poll.vote(id, { + const pollResponse = await masto.v1.polls.vote(id, { choices: votes, }); console.log(pollResponse); @@ -1087,7 +1087,7 @@ function Poll({ poll, readOnly, onUpdate = () => {} }) { setUIState('loading'); (async () => { try { - const pollResponse = await masto.v1.poll.fetch(id); + const pollResponse = await masto.v1.polls.fetch(id); onUpdate(pollResponse); } catch (e) { // Silent fail