Skip to content

Commit

Permalink
QR base64 decode 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
4roring committed Nov 22, 2024
1 parent 937a2fd commit 275dc8a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/modules/Bingo/BingoQR.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ const BingoQR = () => {
useEffect(() => {
// API 호출
const fetchData = async () => {
const origin_id = atob(id);
const myId = localStorage.getItem("myID");
if (myId === null) window.location.href = "";
if (myId === null || myId === "") window.location.href = "";

const user = await getUser(myId);
if (user === null) {
if (user === null || user.ok === false) {
localStorage.setItem("myID", "");
window.location.href = "";
}

const result = await updateBingoBoard(id, user.user_id);
const result = await updateBingoBoard(origin_id, user.user_id);
if (result === true) window.location.href = "/bingo";
};

Expand Down

0 comments on commit 275dc8a

Please sign in to comment.