Files
discord-decomp/modules/friend_suggestions/FriendSuggestionActionCreators.tsx
T
2026-11-01 12:12:55 +02:00

52 lines
1.2 KiB
TypeScript

// Metro module 5949 (f5950).
import { Endpoints } from "../../Constants";
import { HTTP } from "../../_bundle/sendRequest";
import Dispatcher from "../../Dispatcher";
const r19 = {
fetch: async () => {
let c25658_3 = 0;
let c29645_0;
L10: {
try {
c29645_0 = void 0;
c25658_3 = 1;
c29645_0 = await HTTP.get({
url: Endpoints.FRIEND_SUGGESTIONS,
rejectWithError: true
});
Dispatcher.dispatch({
type: "LOAD_FRIEND_SUGGESTIONS_SUCCESS",
suggestions: c29645_0.body
});
c25658_3 = 0;
} catch ($e) {
let r8 = $e;
if (c25658_3 !== 0) {
while (true) {
try {
c25658_3 = 0;
Dispatcher.dispatch({
type: "LOAD_FRIEND_SUGGESTIONS_FAILURE"
});
break L10;
} catch ($e) {
r8 = $e;
if (c25658_3 === 0) {
break;
}
}
}
}
throw r8;
}
}
},
ignore: (a0) => {
HTTP.del({
url: Endpoints.FRIEND_SUGGESTION(a0),
rejectWithError: true
});
}
};
export default r19;