Commit 46bac255 by Mac Stephens

Remove register URL routing while retaining device registration form

parent d4d5aeae
......@@ -4,7 +4,6 @@ program wcEmiMobile;
uses
Vcl.Forms,
Web,
XData.Web.Connection,
Auth.Service in 'Auth.Service.pas',
App.Types in 'App.Types.pas',
......@@ -34,11 +33,6 @@ uses
procedure DisplayLoginView(AMessage: string = ''); forward;
function HasRegisterParameter: Boolean;
begin
Result := TJSURLSearchParams.new(window.location.search).has('register');
end;
procedure DisplayMainView;
procedure ConnectProc;
......@@ -64,19 +58,6 @@ begin
TFViewLogin.Display(@DisplayMainView, AMessage);
end;
procedure DisplayDeviceRegistrationView;
procedure OnRegistered;
begin
if Assigned(FViewDeviceRegistration) then
FViewDeviceRegistration.Free;
DisplayLoginView;
end;
begin
TFViewDeviceRegistration.Display(@OnRegistered);
end;
procedure UnauthorizedAccessProc(AMessage: string);
begin
DisplayLoginView(AMessage);
......@@ -84,12 +65,6 @@ end;
procedure StartApplication;
begin
if HasRegisterParameter then
begin
DisplayDeviceRegistrationView;
Exit;
end;
if (not AuthService.Authenticated) or AuthService.TokenExpired then
DisplayLoginView
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment