Add region code support
This commit is contained in:
@@ -84,6 +84,7 @@ export interface PageParams {
|
||||
|
||||
export interface RegionBody {
|
||||
name: string
|
||||
code?: string
|
||||
isActive?: boolean
|
||||
}
|
||||
|
||||
@@ -91,6 +92,9 @@ export const regions = {
|
||||
list: (params?: PageParams) =>
|
||||
api.get<PaginatedResponse<RegionResponse>>('/regions', { params }).then(r => r.data),
|
||||
|
||||
nextCode: () =>
|
||||
api.get<{ code: string }>('/regions/next-code').then(r => r.data),
|
||||
|
||||
get: (id: string) =>
|
||||
api.get<RegionResponse>(`/regions/${id}`).then(r => r.data),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user