Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

feat: list endpoints #1625

Merged
merged 3 commits into from
Sep 21, 2023
Merged

feat: list endpoints #1625

merged 3 commits into from
Sep 21, 2023

Conversation

lucasmarshall
Copy link
Contributor

Test Plan

Tested locally against hubspot and salesforce account and contact lists

@vercel
Copy link

vercel bot commented Sep 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
management-ui ⬜️ Ignored (Inspect) Visit Preview Sep 21, 2023 11:09pm
supaglue-docs ⬜️ Ignored (Inspect) Visit Preview Sep 21, 2023 11:09pm

@@ -31,7 +31,7 @@ export default function init(app: Router): void {
const snakecasedKeysLead = toSnakecasedKeysCrmLead(lead);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { raw_data, ...rest } = snakecasedKeysLead;
return res.status(200).send(req.query.include_raw_data === 'true' ? snakecasedKeysLead : rest);
return res.status(200).send(req.query?.include_raw_data?.toString() === 'true' ? snakecasedKeysLead : rest);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refactor into util function? There's a bunch of places where we do this.

@@ -35,7 +35,7 @@ export default function init(app: Router): void {
req: Request<ListAccountsPathParams, ListAccountsResponse, ListAccountsRequest, ListAccountsQueryParams>,
res: Response<ListAccountsResponse>
) => {
if (req.query?.read_from_cache?.toString() !== 'true') {
if (req.query?.read_from_cache !== true) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: !req.query?.read_from_cache

@asdfryan
Copy link
Contributor

Looks like there's some build failures?

#53 63.36 api:build: routes/marketing-automation/v2/forms.ts(78,21): error TS2367: This comparison appears to be unintentional because the types 'boolean | undefined' and 'string' have no overlap.

@lucasmarshall lucasmarshall merged commit 9c21b8f into main Sep 21, 2023
9 checks passed
@lucasmarshall lucasmarshall deleted the lucas/list-endpoints branch September 21, 2023 23:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants