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