enable pagination
This commit is contained in:
parent
51165ba933
commit
29857cb004
@ -2,7 +2,7 @@
|
||||
**unreleased v0.3.2**
|
||||
|
||||
- Fix: invite link refered to wrong Discord application, because the client Id was hard coded
|
||||
-
|
||||
- Enhancement: enabled pagination for the `/api/guild-settings/` endpoint
|
||||
-
|
||||
|
||||
**v0.3.1**
|
||||
|
@ -400,7 +400,7 @@ class GuildSettings_ListView(generics.ListCreateAPIView):
|
||||
authentication_classes = [SessionAuthentication, TokenAuthentication]
|
||||
permission_classes = [permissions.IsAuthenticated]
|
||||
|
||||
pagination_class = None
|
||||
pagination_class = DefaultPagination
|
||||
serializer_class = GuildSettingsSerializer
|
||||
metadata_class = ExpandedMetadata
|
||||
|
||||
|
@ -7,7 +7,7 @@ async function showServerSettingsModal() {
|
||||
const server = getCurrentlyActiveServer();
|
||||
var guildSettings;
|
||||
|
||||
try { guildSettings = (await getGuildSettings(server.guild_id))[0] }
|
||||
try { guildSettings = (await getGuildSettings(server.guild_id)).results[0] }
|
||||
catch (error) {
|
||||
console.error(error)
|
||||
return;
|
||||
|
@ -383,7 +383,7 @@ $(document).on("selectedServerChange", async function() {
|
||||
|
||||
async function updateDefaultSubEmbedColour(settings=null) {
|
||||
if (!settings){
|
||||
settings = (await getGuildSettings(guildId))[0]
|
||||
settings = (await getGuildSettings(guildId)).results[0]
|
||||
}
|
||||
$("#subEmbedColour .colour-reset").attr("data-defaultcolour", "#" + settings.default_embed_colour);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user