feat: Implement camera management page and device location updates, including API, typings, and routing.
This commit is contained in:
@@ -53,6 +53,14 @@ export async function apiSearchThings(
|
||||
}
|
||||
}
|
||||
|
||||
export async function apiUpdateThing(value: MasterModel.Thing) {
|
||||
if (!value.id) throw new Error('Thing id is required');
|
||||
return request<MasterModel.Thing>(`${API_SHARE_THING}/${value.id}`, {
|
||||
method: 'PUT',
|
||||
data: value,
|
||||
});
|
||||
}
|
||||
|
||||
export async function apiGetThingPolicyByUser(
|
||||
params: Partial<MasterModel.SearchPaginationBody>,
|
||||
userId: string,
|
||||
|
||||
2
src/services/master/typings/thing.d.ts
vendored
2
src/services/master/typings/thing.d.ts
vendored
@@ -30,6 +30,8 @@ declare namespace MasterModel {
|
||||
state_updated_time?: number;
|
||||
type?: string;
|
||||
updated_time?: number;
|
||||
lat?: string;
|
||||
lng?: string;
|
||||
}
|
||||
|
||||
interface ThingsResponse<
|
||||
|
||||
Reference in New Issue
Block a user