Skip to content

Commit

Permalink
add proposal_files_url field for ProposalTemplate struct
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed Jul 18, 2023
1 parent 35dd2fb commit 469644c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ impl ArbitraryValidVotingTemplateGenerator {

pub fn proposal(&mut self, challenge: ChallengeTemplate, funds: i64) -> ProposalTemplate {
let proposal_url = self.gen_http_address();
let proposal_files_url = self.gen_http_address();
let challenge_type = challenge.challenge_type.clone();
let proposal_challenge_info = self.proposals_challenge_info(&challenge_type);
ProposalTemplate {
Expand All @@ -161,6 +162,7 @@ impl ArbitraryValidVotingTemplateGenerator {

proposal_funds: funds.to_string(),
proposal_url: proposal_url.to_string(),
proposal_files_url: proposal_files_url.to_string(),
proposal_impact_score: self.impact_score().to_string(),
files_url: format!("{}/files", proposal_url),
proposer_relevant_experience: self.proposer().proposer_relevant_experience,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pub struct ProposalTemplate {
pub proposal_summary: String,
pub proposal_funds: String,
pub proposal_url: String,
pub proposal_files_url: String,
pub proposal_impact_score: String,
#[serde(default)]
pub files_url: String,
Expand Down

0 comments on commit 469644c

Please sign in to comment.