Skip to content

Commit 275dc8a

Browse files
committed
QR base64 decode 적용
1 parent 937a2fd commit 275dc8a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/modules/Bingo/BingoQR.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ const BingoQR = () => {
88
useEffect(() => {
99
// API 호출
1010
const fetchData = async () => {
11+
const origin_id = atob(id);
1112
const myId = localStorage.getItem("myID");
12-
if (myId === null) window.location.href = "";
13+
if (myId === null || myId === "") window.location.href = "";
1314

1415
const user = await getUser(myId);
15-
if (user === null) {
16+
if (user === null || user.ok === false) {
1617
localStorage.setItem("myID", "");
1718
window.location.href = "";
1819
}
1920

20-
const result = await updateBingoBoard(id, user.user_id);
21+
const result = await updateBingoBoard(origin_id, user.user_id);
2122
if (result === true) window.location.href = "/bingo";
2223
};
2324

0 commit comments

Comments
 (0)