Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
42 lines
1.6 KiB
TypeScript
42 lines
1.6 KiB
TypeScript
// Module ID: 18064
|
|
// Function ID: 18065
|
|
// Name: actions/GuildActionCreators
|
|
// Dependencies: [1078, 577, 1275, 2]
|
|
// Exports: batchChannelUpdate, batchRoleUpdate
|
|
|
|
// Module 18064 (actions/GuildActionCreators)
|
|
import DispatcherDefault from "Dispatcher" /* 577 */;
|
|
import Constants from "Constants" /* 1078 */;
|
|
import HTTPUtils from "HTTPUtils" /* 1275 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
function batchChannelUpdate(guildId, body) {
|
|
if (body.length > 0) {
|
|
function onEnd() {
|
|
return DispatcherDefault.dispatch({ type: "GUILD_SETTINGS_SUBMIT_SUCCESS" });
|
|
}
|
|
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);
|
|
}
|
|
}
|
|
function batchRoleUpdate(arg0, body) {
|
|
if (body.length > 0) {
|
|
function onEnd() {
|
|
return DispatcherDefault.dispatch({ type: "GUILD_SETTINGS_SUBMIT_SUCCESS" });
|
|
}
|
|
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);
|
|
}
|
|
}
|
|
const Endpoints = Constants.Endpoints;
|
|
const result = size.fileFinishedImporting("actions/native/GuildActionCreators.tsx");
|
|
|
|
export default { batchChannelUpdate, batchRoleUpdate };
|
|
export { batchChannelUpdate };
|
|
export { batchRoleUpdate };
|