Alterações e incluindo página Minhas Vans

This commit is contained in:
Matheus Albino Brunhara
2022-06-20 06:10:16 -05:00
parent c631bb9112
commit c6873625f5
6 changed files with 148 additions and 8 deletions

View File

@@ -17,10 +17,20 @@ function updateHeader() {
};
}
export async function getById(vanId: string) {
export async function getByPlate(vanId: string) {
updateHeader();
const response = await instance.get(vansRoutes.getById.url + `/${vanId}`, {
const response = await instance.get(vansRoutes.getByPlate.url + `/${vanId}`, {
headers: header,
});
return response.data;
}
export async function getByUserId(userId: string) {
updateHeader();
const response = await instance.get(vansRoutes.getByUserId.url + `/${userId}`, {
headers: header,
});