Commit 46bac255 by Mac Stephens

Remove register URL routing while retaining device registration form

parent d4d5aeae
...@@ -4,7 +4,6 @@ program wcEmiMobile; ...@@ -4,7 +4,6 @@ program wcEmiMobile;
uses uses
Vcl.Forms, Vcl.Forms,
Web,
XData.Web.Connection, XData.Web.Connection,
Auth.Service in 'Auth.Service.pas', Auth.Service in 'Auth.Service.pas',
App.Types in 'App.Types.pas', App.Types in 'App.Types.pas',
...@@ -34,11 +33,6 @@ uses ...@@ -34,11 +33,6 @@ uses
procedure DisplayLoginView(AMessage: string = ''); forward; procedure DisplayLoginView(AMessage: string = ''); forward;
function HasRegisterParameter: Boolean;
begin
Result := TJSURLSearchParams.new(window.location.search).has('register');
end;
procedure DisplayMainView; procedure DisplayMainView;
procedure ConnectProc; procedure ConnectProc;
...@@ -64,19 +58,6 @@ begin ...@@ -64,19 +58,6 @@ begin
TFViewLogin.Display(@DisplayMainView, AMessage); TFViewLogin.Display(@DisplayMainView, AMessage);
end; end;
procedure DisplayDeviceRegistrationView;
procedure OnRegistered;
begin
if Assigned(FViewDeviceRegistration) then
FViewDeviceRegistration.Free;
DisplayLoginView;
end;
begin
TFViewDeviceRegistration.Display(@OnRegistered);
end;
procedure UnauthorizedAccessProc(AMessage: string); procedure UnauthorizedAccessProc(AMessage: string);
begin begin
DisplayLoginView(AMessage); DisplayLoginView(AMessage);
...@@ -84,12 +65,6 @@ end; ...@@ -84,12 +65,6 @@ end;
procedure StartApplication; procedure StartApplication;
begin begin
if HasRegisterParameter then
begin
DisplayDeviceRegistrationView;
Exit;
end;
if (not AuthService.Authenticated) or AuthService.TokenExpired then if (not AuthService.Authenticated) or AuthService.TokenExpired then
DisplayLoginView DisplayLoginView
else 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