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

35 lines
788 B
TypeScript

// Metro module 15642 (f15643).
import { Endpoints } from "../Constants";
import { HTTP } from "../_bundle/sendRequest";
import Dispatcher from "../Dispatcher";
const r17 = {
fetchRegions: (a0) => {
const guildId = a0;
HTTP.get({
url: Endpoints.REGIONS(a0),
retries: 1,
oldFormErrors: true,
rejectWithError: true
}).then((result) => Dispatcher.dispatch({
type: "LOAD_REGIONS",
regions: result.body,
guildId
}), () => Dispatcher.dispatch({
type: "LOAD_REGIONS",
regions: [],
guildId
}));
},
changeCallRegion: (a0, a1) => {
HTTP.patch({
url: Endpoints.CALL(a0),
body: {
region: a1
},
oldFormErrors: true,
rejectWithError: true
});
}
};
export default r17;