api: Make knownOrigins parsing logic more robust.
This commit is contained in:
parent
f848514df1
commit
7992691d94
@ -30,7 +30,7 @@ proc loadConfig(args: Table[string, docopt.Value]): HffEntryFormsApiConfig =
|
|||||||
debug: cfg.hasKey("debug") and cfg.getVal("debug") == "true",
|
debug: cfg.hasKey("debug") and cfg.getVal("debug") == "true",
|
||||||
eventParentId: cfg.getVal("event-parent-id"),
|
eventParentId: cfg.getVal("event-parent-id"),
|
||||||
integrationToken: cfg.getVal("integration-token"),
|
integrationToken: cfg.getVal("integration-token"),
|
||||||
knownOrigins: cfg.getVal("known-origins")[1..^2].split(',').mapIt(it[1..^2]),
|
knownOrigins: cfg.getVal("known-origins")[1..^2].split(',').mapIt(it.strip[1..^2]),
|
||||||
notionApiBaseUrl: cfg.getVal("notion-api-base-url"),
|
notionApiBaseUrl: cfg.getVal("notion-api-base-url"),
|
||||||
notionVersion: cfg.getVal("notion-version"),
|
notionVersion: cfg.getVal("notion-version"),
|
||||||
notionConfigDbId: cfg.getVal("notion-config-db-id"),
|
notionConfigDbId: cfg.getVal("notion-config-db-id"),
|
||||||
|
Loading…
Reference in New Issue
Block a user