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 937a2fd commit 275dc8aCopy full SHA for 275dc8a
src/modules/Bingo/BingoQR.tsx
@@ -8,16 +8,17 @@ const BingoQR = () => {
8
useEffect(() => {
9
// API 호출
10
const fetchData = async () => {
11
+ const origin_id = atob(id);
12
const myId = localStorage.getItem("myID");
- if (myId === null) window.location.href = "";
13
+ if (myId === null || myId === "") window.location.href = "";
14
15
const user = await getUser(myId);
- if (user === null) {
16
+ if (user === null || user.ok === false) {
17
localStorage.setItem("myID", "");
18
window.location.href = "";
19
}
20
- const result = await updateBingoBoard(id, user.user_id);
21
+ const result = await updateBingoBoard(origin_id, user.user_id);
22
if (result === true) window.location.href = "/bingo";
23
};
24
0 commit comments