Skip to content

Add read/write pub endpoints#9

Merged
kalilsn merged 5 commits into
mainfrom
kalilsn/read-write-pubs
Aug 8, 2023
Merged

Add read/write pub endpoints#9
kalilsn merged 5 commits into
mainfrom
kalilsn/read-write-pubs

Conversation

@kalilsn
Copy link
Copy Markdown
Contributor

@kalilsn kalilsn commented Jul 17, 2023

Adds very minimal working read/write endpoints for a pub. The structure of the requests and responses will change but you should be able to test integrations with this for now.

For now, to update fields, pass them in the JSON body of the put request under the fields key: {"fields": {"fieldName1": "some value", "fieldname2": "another value"}}

cc @howebenhowe @qweliant @isTravis @gabestein

@kalilsn kalilsn requested a review from 3mcd July 17, 2023 22:56
Copy link
Copy Markdown
Collaborator

@3mcd 3mcd left a comment

Choose a reason for hiding this comment

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

A few (extremely) small items, but otherwise looks (and works) excellent!

Comment thread app/api/v7/integrations/[instance_id]/pubs/[pub_id]/route.ts Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

More of a question because I don't know Prisma at all, but is it necessary to include the values you intend to update when calling update?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i don't believe you do, but the docs weren't entirely clear!

Comment thread app/api/v7/integrations/[instance_id]/pubs/[pub_id]/route.ts Outdated
@render
Copy link
Copy Markdown

render Bot commented Aug 8, 2023

@kalilsn kalilsn force-pushed the kalilsn/read-write-pubs branch from ba9ab23 to 9ad3950 Compare August 8, 2023 19:26
@kalilsn
Copy link
Copy Markdown
Contributor Author

kalilsn commented Aug 8, 2023

@3mcd merging this so Qwelian has it in his branch, but we can keep refining later

@kalilsn kalilsn merged commit 79bc191 into main Aug 8, 2023
@kalilsn kalilsn deleted the kalilsn/read-write-pubs branch August 8, 2023 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants