Skip to content

Commit

Permalink
add: admin can now start and stop game
Browse files Browse the repository at this point in the history
  • Loading branch information
TeeGoood committed Mar 28, 2024
1 parent 116fd20 commit 843d6c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/app/(user)/admin/components/PopIp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ const PopUp = (props: PopUpProps) => {
const handleChangeState = async () => {
try{
if(props.isStart){
await axios.post(`https://api.cutu2024.sgcu.in.th/admin-api/games/${gameId}/start`, {
await axios.post(`https://api.cutu2024.sgcu.in.th/admin-api/games/${gameId}/start`, null, {
headers: {
Authorization: "Basic Y3V0dWZvb3RiYWxsY2x1YjIwMjQ6Y3V0dWZvb3RiYWxsY2x1YjIwMjQ1NTU1"
}
})
}
else{
await axios.post(`https://api.cutu2024.sgcu.in.th/admin-api/games/${gameId}/stop`, {
await axios.post(`https://api.cutu2024.sgcu.in.th/admin-api/games/${gameId}/stop`, null, {
headers: {
Authorization: "Basic Y3V0dWZvb3RiYWxsY2x1YjIwMjQ6Y3V0dWZvb3RiYWxsY2x1YjIwMjQ1NTU1"
}
Expand Down

0 comments on commit 843d6c0

Please sign in to comment.