Skip to content

Commit

Permalink
Revert "#13 hotfix : 배포로 http api 호출되는지 테스트"
Browse files Browse the repository at this point in the history
This reverts commit eeaad63.
  • Loading branch information
wkdghdwns199 committed Sep 12, 2024
1 parent eeaad63 commit 95a2075
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
32 changes: 15 additions & 17 deletions client/src/api/sendToServer.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import axios, {AxiosResponse} from 'axios';
import {studentQr} from '../types/QrType/StudentQr';
import axios, {AxiosResponse} from "axios";
import {studentQr} from "../types/QrType/StudentQr";

interface ServerResponse {
message: string | null;
message: string | null;
}

export const sendToServer = (
data: studentQr,
): Promise<AxiosResponse<ServerResponse>> => {
return axios
.post('//34.47.97.81:8080/api/events/check-in', data)
.then(res => {
console.log(res);
return res;
})
.catch(error => {
console.log(error);
throw error;
});
};
export const sendToServer = (data: studentQr): Promise<AxiosResponse<ServerResponse>> => {
return axios
.post("http://34.47.97.81:8080/api/events/check-in",data)
.then((res) => {
console.log(res);
return res;
})
.catch((error) => {
console.log(error);
throw error;
})
}
2 changes: 1 addition & 1 deletion client/src/hooks/useCheckInStudent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const useCheckInStudent = (eventId: string) => {

const LoadCheckInStudent = () => {
axios
.get(`//34.47.97.81:8080/api/events/check-in/${eventId}?filter=ALL`)
.get(`http://34.47.97.81:8080/api/events/check-in/${eventId}?filter=ALL`)
.then(res => {
const CleanedData = res.data.data;

Expand Down

0 comments on commit 95a2075

Please sign in to comment.