-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ts and update #1
base: master
Are you sure you want to change the base?
Conversation
… statuscodes. Still need to update readme and fix typescript errors for resourceRouter and oauth
…lving errors inside of oauth lib
…d named exports for the 3 'submodules'
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.
Looks good, thanks for all the beautiful documentation!
return normalizeUrl( | ||
path.replace(beginningSlashes, ''), | ||
{ | ||
stripProtocol: true, | ||
stripHash: true, | ||
removeQueryParameters: true, |
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.
just question -- why are we keeping in query params here?
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.
removeQueryParameters doesn't take in a boolean, it takes in a string regex. This line wasn't doing anything, so I took it out.
export const authorizePatch = getPhinClient(HTTPMethod.PATCH); | ||
|
||
//we have to do this for delete because when delete returns 204 no content, phin client crashes | ||
//waiting on PR https://github.com/ethanent/phin/pull/38 |
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.
😢
throw new Error('Invalid token response'); | ||
} | ||
|
||
// set token expiration to be 2 minutes before stated expiration |
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.
good move 🦺
|
||
type AsyncFunction = () => Promise<String> | ||
|
||
export function jwt(oauthKey: string): AsyncFunction { |
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.
if there aren't comments here, do you still get the tooltip highlights on IDEs that render the jsdoc? i do like when they do that
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.
oh...no tooltip on hover yeah. I like it more too though! I'll move the comment I already wrote over the jwt/clientCredentials functions.
No description provided.