46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
// Metro module 16455 (f16456).
|
|
import { Endpoints } from "../../Constants";
|
|
import Dispatcher from "../../Dispatcher";
|
|
import { HTTP } from "../../_bundle/sendRequest";
|
|
export function batchChannelUpdate(a0, a1) {
|
|
if (!(a1.length <= 0)) {
|
|
const onEnd2 = function onEnd() {
|
|
return Dispatcher.dispatch({
|
|
type: "GUILD_SETTINGS_SUBMIT_SUCCESS"
|
|
});
|
|
};
|
|
Dispatcher.dispatch({
|
|
type: "GUILD_SETTINGS_SUBMIT"
|
|
});
|
|
HTTP.patch({
|
|
url: Endpoints.GUILD_CHANNELS(a0),
|
|
body: a1,
|
|
oldFormErrors: true,
|
|
rejectWithError: true
|
|
}).then(onEnd2, onEnd2);
|
|
}
|
|
}
|
|
export function batchRoleUpdate(a0, a1) {
|
|
if (!(a1.length <= 0)) {
|
|
const onEnd2 = function onEnd() {
|
|
return Dispatcher.dispatch({
|
|
type: "GUILD_SETTINGS_SUBMIT_SUCCESS"
|
|
});
|
|
};
|
|
Dispatcher.dispatch({
|
|
type: "GUILD_SETTINGS_SUBMIT"
|
|
});
|
|
HTTP.patch({
|
|
url: Endpoints.GUILD_ROLES(a0),
|
|
body: a1,
|
|
oldFormErrors: true,
|
|
rejectWithError: true
|
|
}).then(onEnd2, onEnd2);
|
|
}
|
|
}
|
|
const r17 = {
|
|
batchChannelUpdate,
|
|
batchRoleUpdate
|
|
};
|
|
export default r17;
|