Files
discord-decomp/actions/GuildAffinitiesActionCreators.tsx
T
2026-11-01 12:12:55 +02:00

21 lines
608 B
TypeScript

// Metro module 8181 (f8182).
import { Endpoints } from "../Constants";
import { HTTP, rejectWithMigratedError } from "../_bundle/sendRequest";
import Dispatcher from "../Dispatcher";
export function fetchGuildAffinities() {
return HTTP.get({
url: Endpoints.GUILD_AFFINITIES,
oldFormErrors: true,
rejectWithError: rejectWithMigratedError()
}).then((result) => {
Dispatcher.dispatch({
type: "LOAD_GUILD_AFFINITIES_SUCCESS",
guildAffinities: result.body.guild_affinities
});
}, () => {
Dispatcher.dispatch({
type: "LOAD_GUILD_AFFINITIES_FAILURE"
});
});
}