Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
sync conect #281
sync conect #281
Changes from all commits
fd9817a
8ef5bb0
9df2e05
b7e951a
f950768
76d1cf6
a32d409
8f3da22
4df41e9
2da2d45
e089043
610c9b1
b51f0d3
f94a709
5b92631
6df88d8
c84606e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Tiny nitpick, this feels to me like the user of the API code has to care too much about the format of the request (like having to format the authorization header manually, and specify the content type string).
I assume we'll be needing to make similar calls in a number of other places, so it would be nice to have it handled more succinctly from the caller's perspective. What do you think?
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.
Agree the authorization header could be hidden away (other headers are already added elsewhere), but everything else is the responsibility of the api call to set, so laying it out like this shows the intent. If I were to change anything anything it might be to do something like this:
api.createAuthenticatedRequest(...)
Maybe
body
could be more explicitlyjsonBody
then there'd be no need to set the content type either, I suppose.I think we should see what we end up doing for the actual data sync and then refactor then. I don't really want to define something now that might get changed later tbh.