We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0aeb61a commit f429954Copy full SHA for f429954
src/components/stickybanMatch.tsx
@@ -95,16 +95,12 @@ const Whitelist = (props: { ckey: string }) => {
95
callApi(`/Stickyban/Whitelist?ckey=${ckey}`, {
96
method: "POST",
97
}).then((value) => {
98
- value.text().then((value) => {
99
- setOpen(false);
100
- if (value) {
101
- global?.updateAndShowToast(
102
- `Whitelisted ${ckey} against ${value} stickybans.`
103
- );
104
- } else {
105
- global?.updateAndShowToast(`No stickybans lifted for ${ckey}.`);
106
- }
107
- });
+ setOpen(false);
+ if (value.status == 202) {
+ global?.updateAndShowToast(`Whitelisted ${ckey}.`);
+ } else {
+ global?.updateAndShowToast(`No stickybans lifted for ${ckey}.`);
+ }
108
});
109
};
110
0 commit comments