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:
@ -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}/`;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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',
|
||||
},
|
||||
|
@ -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',
|
||||
},
|
||||
|
Reference in New Issue
Block a user