add redux state for settings

This commit is contained in:
Alex Holliday committed 2024-09-26 16:18:25 +08:00
1 parent 0832e8438a
commit 179e95eefe
3 files changed
+175 -1

No files matched your search

+21
View File
@@ -619,6 +619,27 @@ class NetworkService {
}
);
}
/**
* ************************************
* Get app settings
* ************************************
*
* @async
* @param {Object} config - The configuration object.
* @param {string} config.authToken - The authorization token to be used in the request header.
* @returns {Promise<AxiosResponse>} The response from the axios GET request.
*
*/
async getAppSettings(config) {
return this.axiosInstance.get("/settings", {
headers: {
Authorization: `Bearer ${config.authToken}`,
"Content-Type": "application/json",
},
});
}
}
export default NetworkService;