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;
|
||||
}
|
||||
|
||||
async function create(data: BusinessTypePayLoad) {
|
||||
const res = await api.post('/business-type', {
|
||||
async function create(
|
||||
data: BusinessTypePayLoad,
|
||||
): Promise<BusinessType | null> {
|
||||
const res = await api.post<BusinessType>('/business-type', {
|
||||
...data,
|
||||
});
|
||||
|
||||
if (res.status < 400) {
|
||||
return res.data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue