feat(appwrite): add appwrite integration

This commit is contained in:
Rıdvan Akca
2024-01-25 12:40:08 +03:00
committed by Ali BARIN
parent bb73f90374
commit 9dc82290b5
10 changed files with 152 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
const addAuthHeader = ($, requestConfig) => {
requestConfig.headers['Content-Type'] = 'application/json';
if ($.auth.data?.apiKey && $.auth.data?.projectId) {
requestConfig.headers['X-Appwrite-Project'] = $.auth.data.projectId;
requestConfig.headers['X-Appwrite-Key'] = $.auth.data.apiKey;
}
if ($.auth.data?.host) {
requestConfig.headers['Host'] = $.auth.data.host;
}
return requestConfig;
};
export default addAuthHeader;