From efa6ca215ef307ecd0a59626e2215e15a367039b Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Tue, 26 Oct 2021 11:53:17 -0500 Subject: [PATCH] api: Add support for location in proposed events. --- api/src/hff_entry_forms_apipkg/models.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/src/hff_entry_forms_apipkg/models.nim b/api/src/hff_entry_forms_apipkg/models.nim index 8feec9d..4b7ce5a 100644 --- a/api/src/hff_entry_forms_apipkg/models.nim +++ b/api/src/hff_entry_forms_apipkg/models.nim @@ -7,6 +7,7 @@ type purpose*: string department*: string owner*: string + location*: string date*: DateTime budgetInDollars*: int @@ -41,6 +42,7 @@ proc parseEventProposal*(n: JsonNode): EventProposal {.raises: [JsonParsingError description: n.getOrFail("description").getStr, purpose: n.getOrFail("purpose").getStr, department: n.getOrFail("department").getStr, + location: n.getOrFail("location").getStr, owner: n.getOrFail("owner").getStr, date: n.parseIso8601("date"), budgetInDollars: n.getOrFail("budgetInDollars").getInt) @@ -53,7 +55,7 @@ proc asNotionPage*(ep: EventProposal): JsonNode = "Event": { "title": textProp(ep.name) }, "Date": { "date": { "start": formatIso8601(ep.date) } }, "Department": { "multi_select": [ { "name": ep.department } ] }, - "Location": { "rich_text": textProp("") }, + "Location": { "rich_text": textProp(ep.location) }, "Owner": { "rich_text": textProp(ep.owner) }, "State": { "select": { "name": "Proposed" } } },