now passing the type to the remove function for scans
This commit is contained in:
parent
487c8617e4
commit
10308942ac
2 changed files with 6 additions and 6 deletions
|
|
@ -149,7 +149,7 @@ export interface IDeviceAPIContext {
|
|||
keys?: string[],
|
||||
types?: string[]
|
||||
) => Promise<any>;
|
||||
removeFoundComponents: (id: number, key: string, otherTeam?: string) => Promise<AxiosResponse<pond.RemoveFoundComponentsResponse>>;
|
||||
removeFoundComponents: (id: number, key: string, type: pond.ObjectType, otherTeam?: string) => Promise<AxiosResponse<pond.RemoveFoundComponentsResponse>>;
|
||||
}
|
||||
|
||||
export const DeviceAPIContext = createContext<IDeviceAPIContext>({} as IDeviceAPIContext);
|
||||
|
|
@ -989,7 +989,7 @@ export default function DeviceProvider(props: PropsWithChildren<Props>) {
|
|||
})
|
||||
}
|
||||
|
||||
const removeFoundComponents = (id: number, key: string, otherTeam?: string) => {
|
||||
const removeFoundComponents = (id: number, key: string, type: pond.ObjectType, otherTeam?: string) => {
|
||||
let url = "/devices/" + id + "/removeFoundComponents/" + key;
|
||||
const view = otherTeam ? otherTeam : as
|
||||
if(view) url = url + "?as=" + view
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue