import axios from "axios"; const fs = require('fs'); export async function getPusherDump(): Promise { let url = 'http://pusher.workadventure.localhost/dump?token=123'; if (fs.existsSync('/project')) { // We are inside a container. Let's use a direct route url = 'http://pusher:8080/dump?token=123'; } return (await axios({ url, method: 'get', })).data; } export async function getBackDump(): Promise { let url = 'http://api.workadventure.localhost/dump?token=123'; if (fs.existsSync('/project')) { // We are inside a container. Let's use a direct route url = 'http://back:8080/dump?token=123'; } return (await axios({ url, method: 'get', })).data; }