config(Deploy): use environment to config api server.
This commit is contained in:
@@ -3,7 +3,7 @@ import Api from './api';
|
||||
|
||||
class ApiImplementation {
|
||||
constructor() {
|
||||
const implementation = process.env.API_IMPLEMENTATION;
|
||||
const implementation = import.meta.env.VITE_API_IMPLEMENTATION;
|
||||
let apiImplementation;
|
||||
if (implementation === 'django') {
|
||||
apiImplementation = new DjangoApi();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class DjangoApi {
|
||||
constructor() {
|
||||
this.base = process.env.DJANGO_BASE_URL;
|
||||
this.base = import.meta.env.VITE_DJANGO_BASE_URL;
|
||||
}
|
||||
|
||||
getCustomers() {
|
||||
|
||||
Reference in New Issue
Block a user