Add updates by car screen and modal popup (#29)

This commit is contained in:
John Wu
2021-04-06 19:43:49 -07:00
committed by GitHub
parent 09ebbe96e0
commit 1f9db5454f
12 changed files with 401 additions and 113 deletions

View File

@@ -41,7 +41,11 @@ const updatesAPI = {
},
getCarUpdates: async (filter, token) => {
return [];
return { data:[] };
},
getVINUpdates: async (vin, token) => {
return { data:[] };
},
};

View File

@@ -37,6 +37,14 @@ const updatesAPI = {
.then(fetchRespHandler);
},
getVINUpdates: async (vin, token) => {
var u = addQueryParams(`${API_ENDPOINT}/carupdates`, { vin });
return fetch(u, {
method: "GET",
headers: Object.assign({ "Content-Type": "application/json" }, getAuthHeaderOptions(token)),
})
.then(fetchRespHandler);
},
};
export default updatesAPI;