feat: Convert all app files to JS
This commit is contained in:
14
packages/backend/src/apps/dropbox/common/add-auth-header.js
Normal file
14
packages/backend/src/apps/dropbox/common/add-auth-header.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const addAuthHeader = ($, requestConfig) => {
|
||||
requestConfig.headers['Content-Type'] = 'application/json';
|
||||
|
||||
if (
|
||||
!requestConfig.additionalProperties?.skipAddingAuthHeader &&
|
||||
$.auth.data?.accessToken
|
||||
) {
|
||||
requestConfig.headers.Authorization = `Bearer ${$.auth.data.accessToken}`;
|
||||
}
|
||||
|
||||
return requestConfig;
|
||||
};
|
||||
|
||||
export default addAuthHeader;
|
Reference in New Issue
Block a user