api: Pass in the Notion Config DB ID (required for the new client).
This commit is contained in:
parent
2dda8ebd76
commit
fa6dd55ba0
@ -33,6 +33,7 @@ proc loadConfig(args: Table[string, docopt.Value]): HffEntryFormsApiConfig =
|
||||
knownOrigins: cfg.getVal("known-origins")[1..^2].split(',').mapIt(it[1..^2]),
|
||||
notionApiBaseUrl: cfg.getVal("notion-api-base-url"),
|
||||
notionVersion: cfg.getVal("notion-version"),
|
||||
notionConfigDbId: cfg.getVal("notion-config-db-id"),
|
||||
port: parseInt(cfg.getVal("port", "8300")))
|
||||
|
||||
when isMainModule:
|
||||
|
@ -11,7 +11,7 @@ proc getNotionClient(cfg: HffEntryFormsApiConfig): NotionClient =
|
||||
notionClient = some(initNotionClient(NotionClientConfig(
|
||||
apiVersion: cfg.notionVersion,
|
||||
apiBaseUrl: cfg.notionApiBaseUrl,
|
||||
configDbId: "",
|
||||
configDbId: cfg.notionConfigDbId,
|
||||
integrationToken: cfg.integrationToken)))
|
||||
return notionClient.get
|
||||
|
||||
|
@ -12,6 +12,7 @@ type
|
||||
knownOrigins*: seq[string]
|
||||
notionApiBaseUrl*: string
|
||||
notionVersion*: string
|
||||
notionConfigDbId*: string
|
||||
port*: int
|
||||
|
||||
proc newApiError*(parent: ref Exception = nil, respCode: HttpCode, respMsg: string, msg = ""): ref ApiError =
|
||||
|
Loading…
Reference in New Issue
Block a user