decord/beta/source/actions/RegionActionCreators.tsx
github-actions 9b6fea255e chore: update source for beta 346.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-18 19:45:33 +00:00

29 lines
1.1 KiB
TypeScript

// Module ID: 16927
// Function ID: 16928
// Name: RegionActionCreators
// Dependencies: [1074, 1270, 573, 2]
// Module 16927 (RegionActionCreators)
import DispatcherDefault from "Dispatcher" /* 573 */;
import Constants from "Constants" /* 1074 */;
import HTTPUtils from "HTTPUtils" /* 1270 */;
import size from "module_2" /* 2 */;
const require = globalThis.__r;
const Endpoints = Constants.Endpoints;
const result = size.fileFinishedImporting("actions/RegionActionCreators.tsx");
export default {
fetchRegions(id) {
_require = id;
const HTTP = require("HTTPUtils").HTTP;
value = HTTP.get({ url: Endpoints.REGIONS(id), retries: 1, oldFormErrors: true, rejectWithError: true });
value.then((body) => DispatcherDefault.dispatch({ type: "LOAD_REGIONS", regions: body.body, guildId }), () => DispatcherDefault.dispatch({ type: "LOAD_REGIONS", regions: [], guildId }));
},
changeCallRegion(id, region) {
const HTTP = HTTPUtils.HTTP;
const request = { url: Endpoints.CALL(id), body: { region }, oldFormErrors: true, rejectWithError: true };
HTTP.patch(request);
}
};