now passing the type to the remove function for scans

This commit is contained in:
csawatzky 2025-11-04 12:27:10 -06:00
parent 487c8617e4
commit 10308942ac
2 changed files with 6 additions and 6 deletions

View file

@ -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