feat(biz-type): add response type and response data

This commit is contained in:
Methapon2001 2025-08-21 13:39:20 +07:00
parent cd6608a100
commit e24f93ec8b

View file

@ -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;
}