decord/source/actions/RegionActionCreators.tsx

35 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16129
// Function ID: 16130
2026-07-29 08:29:29 +00:00
// Dependencies: [676, 530, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 16129
import set from "set" /* 2 */;
import sendRequest from "sendRequest" /* 530 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const Endpoints = ME.Endpoints;
const result = set.fileFinishedImporting("actions/RegionActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default {
fetchRegions(id) {
2026-07-23 10:11:24 +00:00
const _require = id;
2026-07-29 08:29:29 +00:00
const HTTP = _require(530).HTTP;
const value = HTTP.get({ url: Endpoints.REGIONS(id), retries: 1, oldFormErrors: true, rejectWithError: true });
2026-07-20 16:05:17 +00:00
value.then((body) => {
2026-08-24 06:08:38 +00:00
let obj = closure_1_1(closure_1_2[2]);
2026-07-23 10:11:24 +00:00
obj = { type: "LOAD_REGIONS", regions: body.body, guildId: closure_0 };
2026-07-20 16:05:17 +00:00
return obj.dispatch(obj);
}, () => {
2026-08-24 06:08:38 +00:00
let obj = closure_1_1(closure_1_2[2]);
2026-07-23 10:11:24 +00:00
obj = { type: "LOAD_REGIONS", regions: [], guildId: closure_0 };
2026-07-20 16:05:17 +00:00
return obj.dispatch(obj);
});
},
2026-07-29 08:29:29 +00:00
changeCallRegion(id, region) {
2026-08-24 06:08:38 +00:00
const HTTP = sendRequest.HTTP;
2026-07-29 08:29:29 +00:00
obj = { url: Endpoints.CALL(id), body: obj, oldFormErrors: true, rejectWithError: true };
2026-07-20 16:05:17 +00:00
obj = { region };
HTTP.patch(obj);
}
};