2020-06-10 22:38:27 +02:00
|
|
|
import client from "../client";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
factorioVersion: async () => {
|
|
|
|
|
const response = await client.get('/api/server/facVersion');
|
|
|
|
|
return response.data;
|
2020-06-13 01:47:01 +02:00
|
|
|
},
|
|
|
|
|
status: async () => {
|
|
|
|
|
const response = await client.get('/api/server/status');
|
|
|
|
|
return response.data;
|
|
|
|
|
},
|
2020-06-20 23:31:05 +02:00
|
|
|
stop: async () => {
|
2020-06-26 11:58:54 +02:00
|
|
|
const response = await client.get('/api/server/stop');
|
2020-06-20 23:31:05 +02:00
|
|
|
return response.data;
|
|
|
|
|
},
|
|
|
|
|
start: async (ip, port, savefile) => {
|
|
|
|
|
const response = await client.post('/api/server/start', {
|
|
|
|
|
bindip: ip,
|
|
|
|
|
savefile,
|
|
|
|
|
port
|
|
|
|
|
});
|
|
|
|
|
return response.data;
|
|
|
|
|
},
|
|
|
|
|
kill: async () => {
|
|
|
|
|
const response = await client.get('/api/server/kill');
|
|
|
|
|
return response.data;
|
|
|
|
|
}
|
2020-06-10 22:38:27 +02:00
|
|
|
}
|