Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Quick.ORM.RestServer.pas #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions Quick.ORM.RestServer.pas
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{ ***************************************************************************

Copyright (c) 2016-2019 Kike P�rez
Copyright (c) 2016-2019 Kike Pérez

Unit : Quick.ORM.RestServer
Description : Rest ORM Server allows access by http, httpapi or websockets
Author : Kike P�rez
Author : Kike Pérez
Version : 1.9
Created : 02/06/2017
Modified : 08/05/2019
Expand Down Expand Up @@ -115,17 +115,19 @@ THTTPServerOptions = class
constructor Create;
destructor Destroy; override;
end;

TGuidArray = array of TGUID;

TORMService = class
public
fMethodClass : TInterfacedClass;
fMethodInterface : TGUID;
fMethodInterface : TGuidArray;
fInstanceImplementation : TServiceInstanceImplementation;
fResultAsXMLIfRequired : Boolean;
fEnabled : Boolean;
public
property MethodClass : TInterfacedClass read fMethodClass write fMethodClass;
property MethodInterface : TGUID read fMethodInterface write fMethodInterface;
property MethodInterface : TGuidArray read fMethodInterface write fMethodInterface;
property InstanceImplementation : TServiceInstanceImplementation read fInstanceImplementation write fInstanceImplementation;
property ResultAsXMLIfRequired : Boolean read fResultAsXMLIfRequired write fResultAsXMLIfRequired;
property Enabled : Boolean read fEnabled write fEnabled;
Expand Down Expand Up @@ -518,7 +520,7 @@ function TORMRestServer.Connect(DoCustomDB : TProc) : Boolean;
//service initialization
if fService.Enabled then
begin
ServiceFactoryServer := ORM.ServiceDefine(fService.MethodClass, [fService.fMethodInterface], fService.InstanceImplementation);
ServiceFactoryServer := ORM.ServiceDefine(fService.MethodClass, fService.fMethodInterface, fService.InstanceImplementation);
ServiceFactoryServer.SetOptions([], [optErrorOnMissingParam]);
if (not Security.Enabled) or (Security.PublicServices) then ServiceFactoryServer.ByPassAuthentication := True;
//determines if service will return XML if client only accepts XML
Expand Down