Cosmos-Server/client/src/api/index.jsx

34 lines
628 B
React
Raw Normal View History

2023-03-12 18:17:28 +00:00
import * as auth from './authentication.jsx';
2023-03-13 00:49:27 +00:00
import * as users from './users.jsx';
2023-03-16 18:56:36 +00:00
import * as config from './config.jsx';
2023-03-25 20:15:00 +00:00
import * as docker from './docker.jsx';
2023-03-29 20:38:50 +00:00
import wrap from './wrap';
const getStatus = () => {
return wrap(fetch('/cosmos/api/status', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}))
}
const newInstall = (req) => {
return wrap(fetch('/cosmos/api/newInstall', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(req)
}))
}
2023-03-12 18:17:28 +00:00
export {
2023-03-13 00:49:27 +00:00
auth,
2023-03-16 18:56:36 +00:00
users,
2023-03-25 20:15:00 +00:00
config,
2023-03-29 20:38:50 +00:00
docker,
getStatus,
newInstall,
2023-03-12 18:17:28 +00:00
};