-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(js): upload and update examples multipart in JS #1216
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor comments. approving to unblock
js/src/client.ts
Outdated
example.attachments = attachmentsArray.reduce( | ||
(acc, { key, value }) => { | ||
if (value.reader != null) { | ||
acc[key.startsWith("attachment.") ? key.slice(11) : key] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use 11 here. Use len("attachment.") or remove the prefix
* @param updates List of ExampleUpdateWithAttachments objects to upsert | ||
* @returns Promise with the update response | ||
*/ | ||
public async updateExamplesMultipart( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we really naming a public API this?
Why not just updateExamples
?
* @param uploads List of ExampleUploadWithAttachments objects to upload | ||
* @returns Promise with the upload response | ||
*/ | ||
public async uploadExamplesMultipart( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above
No description provided.