Ajout page statistiques
This commit is contained in:
@@ -242,6 +242,16 @@ export const voteService = {
|
||||
if (error) throw error;
|
||||
},
|
||||
|
||||
async getByCampaign(campaignId: string): Promise<Vote[]> {
|
||||
const { data, error } = await supabase
|
||||
.from('votes')
|
||||
.select('*')
|
||||
.eq('campaign_id', campaignId);
|
||||
|
||||
if (error) throw error;
|
||||
return data || [];
|
||||
},
|
||||
|
||||
async getParticipantVoteStatus(campaignId: string): Promise<ParticipantWithVoteStatus[]> {
|
||||
const { data: participants, error: participantsError } = await supabase
|
||||
.from('participants')
|
||||
|
||||
Reference in New Issue
Block a user