Skip to content

Commit

Permalink
add isGlobal peroperty to js model
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland committed Feb 1, 2024
1 parent d130f6b commit 69b47f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/src/forum/models/Poll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ export default class Poll extends Model {
return Model.hasMany<PollVote>('myVotes').call(this);
}

isGlobal() {
return Model.attribute<boolean>('isGlobal').call(this);
}

apiEndpoint() {
/** @ts-ignore */
return `/fof/polls${this.exists ? `/${this.data.id}` : ''}`;
Expand Down

0 comments on commit 69b47f9

Please sign in to comment.