Additions Channel Testing

This commit is contained in:
Patrick Fic
2021-05-20 16:53:00 -07:00
parent 130dac3921
commit f4b045bc33
3 changed files with 10 additions and 7 deletions

12
env.js
View File

@@ -1,5 +1,7 @@
import * as Updates from "expo-updates";
const ENV = {
dev: {
test: {
API_URL: "https://api.test.imex.online",
uri: "https://db.test.bodyshop.app/v1/graphql",
wsuri: "wss://db.test.bodyshop.app/v1/graphql",
@@ -42,10 +44,10 @@ const ENV = {
};
function getEnvVars() {
let env = process.env.NODE_ENV;
if (env === null || env === undefined || env === "") return ENV.dev;
if (env.indexOf("dev") !== -1) return ENV.dev;
if (env.indexOf("prod") !== -1) return ENV.prod;
let env = Updates.releaseChannel;
if (env === null || env === undefined || env === "") return ENV.test;
if (env.indexOf("test") !== -1) return ENV.test;
if (env.indexOf("default") !== -1) return ENV.prod;
else return ENV.prod;
}