mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-21 20:46:26 +02:00
Change package manager request signature
This commit is contained in:
parent
b3be57e0b4
commit
543cb11e69
4 changed files with 13 additions and 7 deletions
|
@ -12,7 +12,10 @@ const msg_format = {
|
|||
|
||||
exports.handler = async ({ axios, language, version }) => {
|
||||
try {
|
||||
const install = await axios.post(`/api/v2/packages/${language}/${version || '*'}`);
|
||||
const install = await axios.post(`/api/v2/packages`, {
|
||||
language,
|
||||
version: version || '*'
|
||||
});
|
||||
|
||||
console.log(msg_format.color(install.data));
|
||||
} catch ({ response }) {
|
||||
|
|
|
@ -12,7 +12,10 @@ const msg_format = {
|
|||
|
||||
exports.handler = async ({ axios, language, version }) => {
|
||||
try {
|
||||
const uninstall = await axios.delete(`/api/v2/packages/${language}/${version || '*'}`)
|
||||
const install = await axios.delete(`/api/v2/packages`, {
|
||||
language,
|
||||
version: version || '*'
|
||||
});
|
||||
|
||||
console.log(msg_format.color(uninstall.data));
|
||||
} catch ({ response }) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue