mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 07:56:18 -05:00
VIN Numbers can be decoded.
This commit is contained in:
parent
e5fe1b6bb9
commit
f2a4eb930c
8 changed files with 195 additions and 4 deletions
|
|
@ -825,3 +825,15 @@ export async function uploadFiles(files, destination) {
|
|||
data.append('destination', destination);
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
export async function fetchDecoded(vinNumber) {
|
||||
const body = {vin_number: vinNumber};
|
||||
const response = await apiPost(`${API_URI}/vin_number_decoder`, body);
|
||||
if (response.status === 200) {
|
||||
const content = await response.json();
|
||||
return content['vin'];
|
||||
} else if (response.status === 400) {
|
||||
console.error('Invalid VIN Number');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue