Skip to content

Commit

Permalink
add tags (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
swaggymarie authored Jun 17, 2024
1 parent 1cda021 commit e3855d8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/client/indexer/proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ export class FutarchyIndexerProposalsClient implements FutarchyProposalsClient {
},
proposal_details: {
title: true,
slug: true
slug: true,
categories: true,
},
dao: {
dao_detail: {
Expand Down Expand Up @@ -274,7 +275,7 @@ export class FutarchyIndexerProposalsClient implements FutarchyProposalsClient {
slug: proposalDetails.slug || p.proposal_acct,
// TODO we need our beatufiul tags
title: proposalDetails.title ?? "",
tags: []
tags: proposalDetails.categories ?? []
};
}
});
Expand Down Expand Up @@ -414,6 +415,7 @@ export class FutarchyIndexerProposalsClient implements FutarchyProposalsClient {
if (!proposals[0]) return null;

const proposal = proposals[0];

const relatedProtocol = this.protocolMap.get(
proposal.dao.program.program_acct
);
Expand Down Expand Up @@ -595,8 +597,7 @@ export class FutarchyIndexerProposalsClient implements FutarchyProposalsClient {
state: proposal.status as ProposalState,
reactions: proposal.reactions.map((r) => r.reaction),
protocol: relatedProtocol,
// TODO we need our beatufiul tags
tags: proposalDetails.categories || [],
tags: proposalDetails.categories,
title: proposalDetails.title ?? "",
volume: passVolume + failVolume
};
Expand Down

0 comments on commit e3855d8

Please sign in to comment.