adjust citysite table name to activesites
This commit is contained in:
1 parent
fb0f996776
commit
64b37b6b6d
27 files changed
+382
-221
No files matched your search
@@ -2,8 +2,8 @@ import type {
|
||||
AIInsight,
|
||||
ChickenCounting,
|
||||
ChickenWeight,
|
||||
CitySite,
|
||||
CitySiteWrite,
|
||||
ActiveSite,
|
||||
ActiveSiteWrite,
|
||||
CountingWrite,
|
||||
Cycle,
|
||||
CycleFilter,
|
||||
@@ -164,12 +164,13 @@ export const api = {
|
||||
logout: () => post<void>('/auth/logout/'),
|
||||
me: () => get<User>('/auth/me/'),
|
||||
},
|
||||
citySites: {
|
||||
list: async () => unwrapList(await get<Paginated<CitySite> | CitySite[]>('/city-sites/')),
|
||||
create: (body: CitySiteWrite) => post<CitySite>('/city-sites/', body),
|
||||
update: (id: number, body: Partial<CitySiteWrite>) =>
|
||||
patch<CitySite>(`/city-sites/${id}/`, body),
|
||||
remove: (id: number) => del(`/city-sites/${id}/`),
|
||||
activeSites: {
|
||||
list: async () =>
|
||||
unwrapList(await get<Paginated<ActiveSite> | ActiveSite[]>('/active-sites/')),
|
||||
create: (body: ActiveSiteWrite) => post<ActiveSite>('/active-sites/', body),
|
||||
update: (id: number, body: Partial<ActiveSiteWrite>) =>
|
||||
patch<ActiveSite>(`/active-sites/${id}/`, body),
|
||||
remove: (id: number) => del(`/active-sites/${id}/`),
|
||||
},
|
||||
users: {
|
||||
list: async () => unwrapList(await get<Paginated<User> | User[]>('/users/')),
|
||||
|
||||
Reference in new issue
Block a user