Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8a6b8c1

Browse files
committedFeb 21, 2021
Call the scheduler API with m2m token and remove token from payload
1 parent f62495f commit 8a6b8c1

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed
 

‎src/common/helper.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,16 +154,12 @@ async function createEventsInExecutor (events) {
154154
externalId: event.externalId,
155155
method: 'patch',
156156
scheduleTime: event.scheduleTime,
157-
headers: {
158-
'content-type': 'application/json',
159-
Authorization: `Bearer ${token}`
160-
},
161157
payload: JSON.stringify(event.payload)
162158
}
163159

164160
// call executor api
165161
logger.debug(`request POST ${url}`)
166-
await axios.post(`${url}`, executorPayload)
162+
await axios.post(`${url}`, executorPayload, { headers: { Authorization: `Bearer ${token}` } })
167163
} catch (err) {
168164
logger.warn(`Failed to create event for external ID ${event.externalId}`)
169165
logger.error(err.message)

0 commit comments

Comments
 (0)
This repository has been archived.