feat: Convert all app files to JS
This commit is contained in:
16
packages/backend/src/apps/ntfy/common/add-auth-header.js
Normal file
16
packages/backend/src/apps/ntfy/common/add-auth-header.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const addAuthHeader = ($, requestConfig) => {
|
||||
if ($.auth.data.serverUrl) {
|
||||
requestConfig.baseURL = $.auth.data.serverUrl;
|
||||
}
|
||||
|
||||
if ($.auth.data?.username && $.auth.data?.password) {
|
||||
requestConfig.auth = {
|
||||
username: $.auth.data.username,
|
||||
password: $.auth.data.password,
|
||||
};
|
||||
}
|
||||
|
||||
return requestConfig;
|
||||
};
|
||||
|
||||
export default addAuthHeader;
|
Reference in New Issue
Block a user