#32 Remove dummy data. Modified makeRequest so it doesn't send body on GET
This commit was merged in pull request #37.
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
const makeRequest = ({ url, method, body = {} }): Promise<Response> => {
|
||||
return fetch(url, {
|
||||
const makeRequest = ({ url, method, body = null }): Promise<Response> => {
|
||||
const req: RequestInit = {
|
||||
method: method,
|
||||
credentials: "include",
|
||||
body: JSON.stringify(body),
|
||||
headers: { "content-type": "application/json" },
|
||||
mode: "cors",
|
||||
});
|
||||
};
|
||||
if (body) {
|
||||
req["body"] = JSON.stringify(body);
|
||||
}
|
||||
return fetch(url, req);
|
||||
};
|
||||
|
||||
const sendLoginRequest = async (
|
||||
|
||||
Reference in New Issue
Block a user