Fleet Desktop: Refetch uses device API not host API (#4770)

This commit is contained in:
RachelElysia 2022-03-23 14:51:12 -04:00 committed by GitHub
parent cf34466e7f
commit a3789c817e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,6 @@ import classnames from "classnames";
import { isEmpty, pick, reduce } from "lodash";
import deviceUserAPI from "services/entities/device_user";
import hostAPI from "services/entities/hosts";
import { IHost, IDeviceMappingResponse } from "interfaces/host";
import { ISoftware } from "interfaces/software";
// @ts-ignore
@ -209,7 +208,7 @@ const DeviceUserPage = ({
// method.
setShowRefetchSpinner(true);
try {
await hostAPI.refetch(host).then(() => {
await deviceUserAPI.refetch(deviceAuthToken).then(() => {
setRefetchStartTime(Date.now());
setTimeout(() => {
refetchHostDetails();