2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

[FR] Add API endpoint to activate plugins (#4186)

* make plugin urls def cleaner

* rename plugin managment endpoints

* [FR] Add API endpoint to activate plugins
Fixes #4182

* fix for api url change

* bump API version
This commit is contained in:
Matthias Mair
2023-01-25 21:05:09 +01:00
committed by GitHub
parent 3d5be5a5c7
commit 8df5649b6f
8 changed files with 49 additions and 31 deletions

View File

@ -79,7 +79,7 @@ $('table').find('.boolean-setting').change(function() {
if (notification) {
url = `/api/settings/notification/${pk}/`;
} else if (plugin) {
url = `/api/plugin/settings/${plugin}/${setting}/`;
url = `/api/plugins/settings/${plugin}/${setting}/`;
} else if (user) {
url = `/api/settings/user/${setting}/`;
}

View File

@ -44,7 +44,7 @@ function editSetting(key, options={}) {
var url = '';
if (plugin) {
url = `/api/plugin/settings/${plugin}/${key}/`;
url = `/api/plugins/settings/${plugin}/${key}/`;
} else if (notification) {
url = `/api/settings/notification/${pk}/`;
} else if (global) {

View File

@ -235,7 +235,7 @@ function selectLabel(labels, items, options={}) {
// Request a list of available label printing plugins from the server
if (plugins_enabled) {
inventreeGet(
`/api/plugin/`,
`/api/plugins/`,
{
mixin: 'labels',
},

View File

@ -11,7 +11,7 @@
*/
function installPlugin() {
constructForm(`/api/plugin/install/`, {
constructForm(`/api/plugins/install/`, {
method: 'POST',
title: '{% trans "Install Plugin" %}',
fields: {
@ -50,7 +50,7 @@ function locateItemOrLocation(options={}) {
// Request the list of available 'locate' plugins
inventreeGet(
`/api/plugin/`,
`/api/plugins/`,
{
mixin: 'locate',
},