Add business registration for customers, owner panel, role-based nav, and Montime branding.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+12
-1
@@ -1,5 +1,5 @@
|
||||
import { api } from './client';
|
||||
import type { Business } from './types';
|
||||
import type { Business, UpdateBusinessPayload } from './types';
|
||||
|
||||
export function fetchBusinesses(params?: {
|
||||
categoryId?: string;
|
||||
@@ -19,3 +19,14 @@ export function fetchBusinesses(params?: {
|
||||
export function fetchBusiness(id: string) {
|
||||
return api<Business>(`/businesses/${id}`);
|
||||
}
|
||||
|
||||
export function fetchMyBusinesses() {
|
||||
return api<Business[]>('/businesses/mine');
|
||||
}
|
||||
|
||||
export function updateBusiness(id: string, payload: UpdateBusinessPayload) {
|
||||
return api<Business>(`/businesses/${id}`, {
|
||||
method: 'PATCH',
|
||||
body: JSON.stringify(payload),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user