Adding feature which adds toggles to Zim files to enable/disable auto search.

This commit is contained in:
Roland 2025-02-02 10:16:11 -07:00
parent 531ec3d65e
commit 3d6ccad0c0
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
11 changed files with 192 additions and 21 deletions

View file

@ -1333,6 +1333,14 @@ export async function zimUnsubscribe(id) {
return response.status === 204;
}
export async function setZimAutoSearch(id, auto_search) {
const body = {auto_search};
const response = await apiPost(`${API_URI}/zim/${id}/auto_search`, body);
if (response.status !== 204) {
throw new Error('Failed to set Zim auto search');
}
}
export async function fetchDecoded(vinNumber) {
const body = {vin_number: vinNumber};
const response = await apiPost(`${API_URI}/vin_number_decoder`, body);