feat: [2/3]: add poll vote functionality

This commit is contained in:
Xylight committed 2025-11-14 14:28:27 -08:00
1 parent b49ea4e262
commit 90d7ac17ff
7 files changed
+124 -42

No files matched your search

+10
View File
@@ -1020,4 +1020,14 @@ export class PiefedClient implements BaseClient {
async listMedia(): ReturnType<BaseClient['listMedia']> {
throw new Error('unsupported')
}
async voteOnPoll(
params: NullableFnArg<BaseClient['voteOnPoll']>[0],
): NullableFnReturn<BaseClient['voteOnPoll']> {
const response = (
await this.#client.POST('/api/alpha/post/poll_vote', { body: params })
).data!
return toPostView(response)
}
}