mirror of
https://github.com/fspc/workstand.git
synced 2026-09-17 00:51:39 -04:00
Check cpic action.
This commit is contained in:
@@ -58,6 +58,23 @@ const Api = {
|
||||
throw error;
|
||||
});
|
||||
},
|
||||
cpicBike(id) {
|
||||
fetch(`/api/v1/bikes/${id}/check/`, {
|
||||
credentials: 'same-origin',
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRFToken': csrfToken,
|
||||
},
|
||||
})
|
||||
.then(checkStatus)
|
||||
.then(parseJson)
|
||||
.then(data => data)
|
||||
.catch((error) => {
|
||||
console.log('request failed', error);
|
||||
throw error;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export default Api;
|
||||
|
||||
Reference in New Issue
Block a user