-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "#13 hotfix : 배포로 http api 호출되는지 테스트"
This reverts commit eeaad63.
- Loading branch information
1 parent
eeaad63
commit 95a2075
Showing
2 changed files
with
16 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters