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

This commit is contained in:
Methapon2001 2025-08-21 13:39:20 +07:00 committed by Thanaphon Frappet
parent d4a9be9236
commit 5fad663a6e

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