fix: Fetching the Strapi app env
parent
1734977a11
commit
bfccce21de
|
@ -84,7 +84,7 @@ export function setLoadingState(value) {
|
|||
export function getAppEnv(toggleNotification) {
|
||||
return async function(dispatch) {
|
||||
try {
|
||||
const env = await request('/config-sync/app-env', {
|
||||
const { env } = await request('/config-sync/app-env', {
|
||||
method: 'GET',
|
||||
});
|
||||
dispatch(setAppEnvInState(env));
|
||||
|
|
|
@ -88,5 +88,7 @@ module.exports = {
|
|||
* Get the current Strapi env.
|
||||
* @returns {string} The current Strapi environment.
|
||||
*/
|
||||
getAppEnv: async () => strapi.server.app.env,
|
||||
getAppEnv: async () => {
|
||||
return { env: strapi.server.app.env };
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue