Change package manager request signature

This commit is contained in:
Thomas Hobson 2021-05-08 12:41:41 +12:00
parent b3be57e0b4
commit 543cb11e69
No known key found for this signature in database
GPG key ID: 9F1FD9D87950DB6F
4 changed files with 13 additions and 7 deletions

View file

@ -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 }) {

View file

@ -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 }) {