api functions for guild settings
This commit is contained in:
parent
90b3dde68d
commit
b908dff129
@ -24,7 +24,6 @@ async function ajaxRequest(url, method, data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function makeQuerystring(filters, sort) {
|
function makeQuerystring(filters, sort) {
|
||||||
console.log(JSON.stringify(filters, null, 4))
|
|
||||||
let querystring = "?";
|
let querystring = "?";
|
||||||
for (key in filters) {
|
for (key in filters) {
|
||||||
querystring += `${key}=${filters[key]}&`;
|
querystring += `${key}=${filters[key]}&`;
|
||||||
@ -163,4 +162,14 @@ async function getTrackedContentOptions() {
|
|||||||
|
|
||||||
async function getMutators() {
|
async function getMutators() {
|
||||||
return await ajaxRequest("/api/article-mutator/?page_size=25", "GET");
|
return await ajaxRequest("/api/article-mutator/?page_size=25", "GET");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// guild settings
|
||||||
|
|
||||||
|
async function getGuildSettings(guildId) {
|
||||||
|
return await ajaxRequest(`/api/guild-settings/?guild_id=${guildId}`, "GET");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function editGuildSettings(id, formData) {
|
||||||
|
return await ajaxRequest(`/api/guild-settings/${id}/`, "PUT", formData);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user