Skip to content

Commit

Permalink
Merge pull request #44 from BU-Spark/questionAndAnswers
Browse files Browse the repository at this point in the history
Boston Voter App: Question and answers added to strapi
  • Loading branch information
eelkus01 authored Jun 25, 2024
2 parents fb3a002 + 2e65361 commit 038d16d
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 1 deletion.
5 changes: 5 additions & 0 deletions client/src/pages/ballotInfo/[candidate].tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/* Deeper candidate profiles that appear when their icon is clicked in the
* "What's on the Ballot" dropdown. Styles the entire deep profile page. Pulls
* data from strapi "Candidates" content.
*/

import React, { use, useEffect, useState } from 'react';
import { useRouter } from 'next/router';
import { localCandidateAPI, deployedCandidateAPI } from '@/common';
Expand Down
1 change: 0 additions & 1 deletion server/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ app.get('/api/district', async (req: Request, res: Response) => {
if (match && match[1]) {
// Set variable to the extracted digit
councilDistrictNumber = match[1];
console.log(`Council District Number: ${councilDistrictNumber}`);
}
}

Expand Down
63 changes: 63 additions & 0 deletions strapi/src/api/candidate/content-types/candidate/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,69 @@
},
"ElectionName": {
"type": "string"
},
"Question1": {
"type": "string"
},
"Answer1": {
"type": "text"
},
"Question2": {
"type": "string"
},
"Answer2": {
"type": "text"
},
"Question3": {
"type": "string"
},
"Answer3": {
"type": "text"
},
"Question4": {
"type": "string"
},
"Answer4": {
"type": "text"
},
"Question5": {
"type": "string"
},
"Answer5": {
"type": "text"
},
"Question6": {
"type": "string"
},
"Answer6": {
"type": "text"
},
"Question7": {
"type": "string"
},
"Answer7": {
"type": "text"
},
"Question8": {
"type": "string"
},
"Answer8": {
"type": "text"
},
"Question9": {
"type": "string"
},
"Answer9": {
"type": "text"
},
"Question10": {
"type": "string"
},
"Answer10": {
"type": "text"
},
"QuestionsAnswers": {
"type": "json"
}
}
}
21 changes: 21 additions & 0 deletions strapi/types/generated/contentTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,27 @@ export interface ApiCandidateCandidate extends Schema.CollectionType {
LinkedinLink: Attribute.String;
Party: Attribute.String & Attribute.Required;
ElectionName: Attribute.String;
Question1: Attribute.String;
Answer1: Attribute.Text;
Question2: Attribute.String;
Answer2: Attribute.Text;
Question3: Attribute.String;
Answer3: Attribute.Text;
Question4: Attribute.String;
Answer4: Attribute.Text;
Question5: Attribute.String;
Answer5: Attribute.Text;
Question6: Attribute.String;
Answer6: Attribute.Text;
Question7: Attribute.String;
Answer7: Attribute.Text;
Question8: Attribute.String;
Answer8: Attribute.Text;
Question9: Attribute.String;
Answer9: Attribute.Text;
Question10: Attribute.String;
Answer10: Attribute.Text;
QuestionsAnswers: Attribute.JSON;
createdAt: Attribute.DateTime;
updatedAt: Attribute.DateTime;
publishedAt: Attribute.DateTime;
Expand Down

0 comments on commit 038d16d

Please sign in to comment.