Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4823.js (118.4 MB)
51 lines
2 KiB
TypeScript
51 lines
2 KiB
TypeScript
// Module ID: 11948
|
|
// Function ID: 11949
|
|
// Name: AcceptGuildTemplateActionCreators
|
|
// Dependencies: [5363, 1980, 1074, 573, 1271, 7452, 2]
|
|
|
|
// Module 11948 (AcceptGuildTemplateActionCreators)
|
|
import DispatcherDefault from "Dispatcher" /* 573 */;
|
|
import transitionToGuild from "transitionToGuild" /* 7452 */;
|
|
import GatewayConnectionStore from "GatewayConnectionStore" /* 5363 */;
|
|
import GuildStore from "GuildStore" /* 1980 */;
|
|
|
|
require = fn;
|
|
const Endpoints = fn(1074).Endpoints;
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/guild_templates/AcceptGuildTemplateActionCreators.tsx");
|
|
|
|
export default {
|
|
acceptGuildTemplate(code, name, first1) {
|
|
importDefault = name;
|
|
dependencyMap = first1;
|
|
DispatcherDefault.dispatch({ type: "GUILD_TEMPLATE_ACCEPT", code });
|
|
const obj2 = { type: "GUILD_TEMPLATE_ACCEPT", code };
|
|
return new Promise((code, arg1) => {
|
|
name = arg1;
|
|
const HTTP = code(icon[4]).HTTP;
|
|
const request = { url: Endpoints.UNRESOLVED_GUILD_TEMPLATE(code), body: { name, icon }, oldFormErrors: true, rejectWithError: code(icon[4]).rejectWithMigratedError() };
|
|
const obj = { name, icon };
|
|
let obj3 = code(icon[4]);
|
|
HTTP.post(request).then((body) => {
|
|
body = body.body;
|
|
closure_1(dependencyMap[3]).dispatch({ type: "GUILD_TEMPLATE_ACCEPT_SUCCESS", code, guild: body });
|
|
if (connected.isConnected()) {
|
|
const result = GuildStore.addConditionalChangeListener(() => {
|
|
if (null != GuildStore.getGuild(body.id)) {
|
|
transitionToGuild.transitionToGuild(tmp.id);
|
|
body(tmp);
|
|
return false;
|
|
}
|
|
});
|
|
} else {
|
|
code(dependencyMap[5]).transitionToGuild(body.id);
|
|
body(body);
|
|
const obj3 = code(dependencyMap[5]);
|
|
}
|
|
}, (body) => {
|
|
DispatcherDefault.dispatch({ type: "GUILD_TEMPLATE_ACCEPT_FAILURE", code });
|
|
closure_1(body.body);
|
|
});
|
|
});
|
|
}
|
|
};
|