Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Dec 25, 2023
1 parent 09341f9 commit 8f0acbc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ui/app/mirrors/errors/[mirrorName]/ackbutton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ const AckButton = ({ ack, id }: { ack: boolean; id: number | bigint }) => {
// handleAck updates ack to true for the given mirrorID
const handleAck = async (mirrorID: bigint | number) => {
setLoading(true);
const updateRes = await fetch('/api/mirrors/alerts', {
const updateResResult = await fetch('/api/mirrors/alerts', {
method: 'PUT',
body: JSON.stringify({
mirrorIDStringList: [mirrorID.toString()],
}),
}).then((res) => res.json());
});
const updateRes = await updateResResult.json();
setLoading(false);
if (!updateRes || updateRes === 0) {
if (!updateRes) {
notifyErr('Something went wrong when trying to acknowledge');
return;
}
Expand Down

0 comments on commit 8f0acbc

Please sign in to comment.