Skip to content

Commit 2d73f74

Browse files
committed
Fix device heartbeat. Move harnesses outside of AuthorizeView.
1 parent b10cebc commit 2d73f74

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Server/Hubs/AgentHub.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public Task Chat(string message, bool disconnected, string browserConnectionId)
7272
}
7373

7474

75-
public async Task CheckForPendingSriptRuns()
75+
public async Task CheckForPendingScriptRuns()
7676
{
7777
var authToken = _expiringTokenService.GetToken(Time.Now.AddMinutes(AppConstants.ScriptRunExpirationMinutes));
7878
var scriptRuns = await _dataService.GetPendingScriptRuns(Device.ID);
@@ -166,7 +166,7 @@ public async Task DeviceHeartbeat(Device device)
166166

167167
var result = await _dataService.AddOrUpdateDevice(device);
168168

169-
if (result.IsSuccess)
169+
if (!result.IsSuccess)
170170
{
171171
return;
172172
}
@@ -189,7 +189,7 @@ public async Task DeviceHeartbeat(Device device)
189189
}
190190

191191

192-
await CheckForPendingSriptRuns();
192+
await CheckForPendingScriptRuns();
193193
}
194194

195195

Server/Shared/MainLayout.razor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
@Body
1515
</div>
1616
</div>
17-
18-
<ToastHarness />
19-
<LoaderHarness />
20-
<ModalHarness />
2117
</div>
2218
</Authorized>
2319
<NotAuthorized>
@@ -37,3 +33,7 @@
3733

3834
</NotAuthorized>
3935
</AuthorizeView>
36+
37+
<ToastHarness />
38+
<LoaderHarness />
39+
<ModalHarness />

0 commit comments

Comments
 (0)