fix poll vote in pleroma
This commit is contained in:
parent
438867e49a
commit
d74b030688
|
@ -393,8 +393,11 @@ export class MastodonService {
|
|||
let route = `https://${account.instance}${this.apiRoutes.voteOnPoll}`.replace('{0}', pollId);
|
||||
route += `?${this.formatArray(pollSelection.map(x => x.toString()), 'choices')}`;
|
||||
|
||||
let data = new PollData();
|
||||
data.choices = pollSelection;
|
||||
|
||||
const headers = new HttpHeaders({ 'Authorization': `Bearer ${account.token.access_token}` });
|
||||
return this.httpClient.post<Poll>(route, null, { headers: headers }).toPromise();
|
||||
return this.httpClient.post<Poll>(route, data, { headers: headers }).toPromise();
|
||||
}
|
||||
|
||||
getPoll(account: AccountInfo, pollId: string): Promise<Poll> {
|
||||
|
@ -536,6 +539,10 @@ export enum VisibilityEnum {
|
|||
Direct = 4
|
||||
}
|
||||
|
||||
class PollData {
|
||||
choices: number[];
|
||||
}
|
||||
|
||||
class StatusData {
|
||||
status: string;
|
||||
in_reply_to_id: string;
|
||||
|
|
Loading…
Reference in New Issue