mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-14 09:03:03 -04:00
Make all RestAPI calls use Endpoints object
This commit is contained in:
parent
9dc8e4e244
commit
d4ebfc233f
11 changed files with 22 additions and 21 deletions
|
@ -20,7 +20,7 @@ import ErrorBoundary from "@components/ErrorBoundary";
|
|||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { GuildStore, i18n, RestAPI } from "@webpack/common";
|
||||
import { Constants, GuildStore, i18n, RestAPI } from "@webpack/common";
|
||||
|
||||
const { InvitesDisabledExperiment } = findByPropsLazy("InvitesDisabledExperiment");
|
||||
|
||||
|
@ -35,7 +35,7 @@ function disableInvites(guildId: string) {
|
|||
const guild = GuildStore.getGuild(guildId);
|
||||
const features = [...guild.features, "INVITES_DISABLED"];
|
||||
RestAPI.patch({
|
||||
url: `/guilds/${guild.id}`,
|
||||
url: Constants.Endpoints.GUILD(guildId),
|
||||
body: { features },
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue