chef 3745 Posted November 15, 2019 Share Posted November 15, 2019 (edited) I finally have to ask because I just can't see what I did incorrect, and this 500 error has gone on for the last hour and half... I've used this exact code a million and one times, but this time the 'ApiClient.updatePluginConfiguration' is throwing a 500 error when I try to update my plugin config. This is my entire click event... view.querySelector('#createMessage').addEventListener('click', _ => { var adminUsersSelect = view.querySelector('#users'); //Users Select Policy.IsAdministrator Only var messages = []; var message = { Header : view.querySelector('#header').value, Text : view.querySelector('#text').value, Recipients: getRecipientNames(view), Id : Math.floor(Math.random() * 100) //Random Number for ID }; //New message // TODO: make sure that the random number doesn't actually exist and doesn't overwrite anything. // TABS over SPACES // TODO: Allow Message delivery on SessionActivity and SessionStarted ApiClient.getPluginConfiguration(pluginId).then((config) => { if (config.Messages) { config.Messages.forEach((c) => { messages.push(c); }); } messages.push(message); config.Messages = messages; ApiClient.updatePluginConfiguration(pluginId, config).then( (result) => { Dashboard.hideLoadingMsg(); Dashboard.processPluginConfigurationUpdateResult(result); }); }); view.querySelector('#savedMessages').innerHTML += (getSavedMessagesHtml(message)); //Write the new message to the list of saved messages return false; }); Does anything stick out to anyone as being incorrect? "Server.Core 4.2.0.40" Edited November 15, 2019 by chef Link to comment Share on other sites More sharing options...
chef 3745 Posted November 15, 2019 Author Share Posted November 15, 2019 (edited) Nevermind, Ugh! I had a problem with my PluginConfiguration.cs Ignore me... Don't use IEnumerable in the Plugin config use List<T> Edited November 15, 2019 by chef Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now