decord/alpha/source/actions/native/GuildActionCreators.tsx

43 lines
1.6 KiB
TypeScript
Raw Normal View History

// Module ID: 17959
// Function ID: 17960
// Name: actions/GuildActionCreators
// Dependencies: [1074, 573, 1271, 2]
2026-07-20 16:05:17 +00:00
// Exports: batchChannelUpdate, batchRoleUpdate
// Module 17959 (actions/GuildActionCreators)
import DispatcherDefault from "Dispatcher" /* 573 */;
import Constants from "Constants" /* 1074 */;
import HTTPUtils from "HTTPUtils" /* 1271 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
function batchChannelUpdate(guildId, body) {
if (body.length > 0) {
2026-07-29 08:29:29 +00:00
function onEnd() {
return DispatcherDefault.dispatch({ type: "GUILD_SETTINGS_SUBMIT_SUCCESS" });
2026-07-29 08:29:29 +00:00
}
DispatcherDefault.dispatch({ type: "GUILD_SETTINGS_SUBMIT" });
const HTTP = HTTPUtils.HTTP;
const request = { url: Endpoints.GUILD_CHANNELS(guildId), body, oldFormErrors: true, rejectWithError: true };
HTTP.patch(request).then(onEnd, onEnd);
const patchResult = HTTP.patch(request);
2026-07-20 16:05:17 +00:00
}
}
function batchRoleUpdate(arg0, body) {
if (body.length > 0) {
2026-07-29 08:29:29 +00:00
function onEnd() {
return DispatcherDefault.dispatch({ type: "GUILD_SETTINGS_SUBMIT_SUCCESS" });
2026-07-29 08:29:29 +00:00
}
DispatcherDefault.dispatch({ type: "GUILD_SETTINGS_SUBMIT" });
const HTTP = HTTPUtils.HTTP;
const request = { url: Endpoints.GUILD_ROLES(arg0), body, oldFormErrors: true, rejectWithError: true };
HTTP.patch(request).then(onEnd, onEnd);
const patchResult = HTTP.patch(request);
2026-07-20 16:05:17 +00:00
}
}
const Endpoints = Constants.Endpoints;
const result = size.fileFinishedImporting("actions/native/GuildActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default { batchChannelUpdate, batchRoleUpdate };
export { batchChannelUpdate };
export { batchRoleUpdate };