mirror of
https://github.com/azukaar/Cosmos-Server.git
synced 2026-05-23 05:48:38 -05:00
44 lines
799 B
React
44 lines
799 B
React
import wrap from './wrap';
|
|
|
|
function list() {
|
|
return wrap(fetch('/cosmos/api/servapps', {
|
|
method: 'GET',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
}))
|
|
}
|
|
|
|
function secure(id, res) {
|
|
return wrap(fetch('/cosmos/api/servapps/' + id + '/secure/'+res, {
|
|
method: 'GET',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
},
|
|
}))
|
|
}
|
|
|
|
const newDB = () => {
|
|
return wrap(fetch('/cosmos/api/newDB', {
|
|
method: 'GET',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
}
|
|
}))
|
|
}
|
|
|
|
const manageContainer = (id, action) => {
|
|
return wrap(fetch('/cosmos/api/servapps/' + id + '/manage/' + action, {
|
|
method: 'GET',
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
}
|
|
}))
|
|
}
|
|
|
|
export {
|
|
list,
|
|
newDB,
|
|
secure,
|
|
manageContainer
|
|
}; |