Merge pull request #2492 from SchrodingersGat/plugin-settings-refactor

Plugin settings refactor
This commit is contained in:
Oliver authored and GitHub committed 2022-01-07 14:12:22 +11:00
commit 7967c0c0bd
33 files changed
+649 -320

No files matched your search

+5 -1
View File
@@ -28,9 +28,13 @@ function editSetting(pk, options={}) {
// Is this a global setting or a user setting?
var global = options.global || false;
var plugin = options.plugin;
var url = '';
if (global) {
if (plugin) {
url = `/api/plugin/settings/${pk}/`;
} else if (global) {
url = `/api/settings/global/${pk}/`;
} else {
url = `/api/settings/user/${pk}/`;