Skip to content

Commit

Permalink
Fixed get support page params.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Apr 30, 2020
1 parent 03f8f72 commit cfb2b26
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Server/Pages/GetSupport.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ViewData["Title"] = "Get Support";
}

@if (!Request.Query.ContainsKey("deviceUuid"))
@if (!Request.Query.ContainsKey("deviceID"))
{
<h3 class="mb-3">Get Support</h3>
<p>
Expand Down
8 changes: 4 additions & 4 deletions Server/Pages/GetSupport.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ public IActionResult OnGet()
return Page();
}

public async Task<IActionResult> OnPost(string deviceUuid)
public async Task<IActionResult> OnPost(string deviceID)
{
if (!ModelState.IsValid)
{
return Page();
}

var orgID = DataService.GetDevice(deviceUuid)?.OrganizationID;
var orgID = DataService.GetDevice(deviceID)?.OrganizationID;

await DataService.AddAlert(new Remotely.Shared.Models.AlertOptions()
{
AlertDeviceID = deviceUuid,
AlertDeviceID = deviceID,
AlertMessage = $"{Input.Name} is requesting support. " +
$"Email: {Input.Email}. " +
$"Phone: {Input.Phone}. " +
Expand All @@ -51,7 +51,7 @@ await DataService.AddAlert(new Remotely.Shared.Models.AlertOptions()

StatusMessage = "We got it! Someone will contact you soon.";

return RedirectToPage("GetSupport", new { deviceUuid });
return RedirectToPage("GetSupport", new { deviceID });
}

public class InputModel
Expand Down

0 comments on commit cfb2b26

Please sign in to comment.