feat(biz-type): add response type and response data
This commit is contained in:
parent
d4a9be9236
commit
5fad663a6e
1 changed files with 5 additions and 2 deletions
|
|
@ -37,10 +37,13 @@ const useBusinessTypeStore = defineStore('business-type-store', () => {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function create(data: BusinessTypePayLoad) {
|
async function create(
|
||||||
const res = await api.post('/business-type', {
|
data: BusinessTypePayLoad,
|
||||||
|
): Promise<BusinessType | null> {
|
||||||
|
const res = await api.post<BusinessType>('/business-type', {
|
||||||
...data,
|
...data,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.status < 400) {
|
if (res.status < 400) {
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue