-
Notifications
You must be signed in to change notification settings - Fork 11
Conversation
lib/axios.ts
Outdated
| } | ||
| const oauthEndpoint = "enlb0ktwajm8sen" | ||
| const oauthSignature = (await axios.post(`https://${oauthEndpoint}.m.pipedream.net?pipedream_response=1`, payload)).data | ||
| config.headers = oauthSignature |
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 (!config.headers) config.headers = {}
config.headers.Authorization = oauthSignature.Authorization // check case of key in returned oauthSignature object
... or update the workflow to just return the Authorization header value (instead of the object). But still, just update Authorization header because the config may have other header values.
lib/axios.ts
Outdated
| request_data: config, | ||
| sign, | ||
| } | ||
| const oauthEndpoint = "enlb0ktwajm8sen" |
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.
Would be nice to abstract this away in lambda maker if we could call some global function or something... but if @casret is cool with this, I'm fine with it as v0.
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.
Doesn't feel like lambda maker should export it either. Maybe in the auths param auth.trello.auth1_signer or something?
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.
yeah i was thinking we could put the appID in auths too
lib/axios.ts
Outdated
| */ | ||
|
|
||
| export default async function(step: any, config) { | ||
| export default async function(step: any, config, sign?) { |
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.
Is sign just a boolean? It has to contain app id or something right? Should try to get a better name.
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.
it's an object the token and app name, i'll rename it to signConfig?
No description provided.