Skip to content

Commit 5446449

Browse files
authored
Update README.md
added missing function()...end to pcall in sample code
1 parent 02d2af5 commit 5446449

1 file changed

Lines changed: 33 additions & 29 deletions

File tree

README.md

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,22 @@ end
8787
function handle(request_rec)
8888
local success, result = pcall
8989
(
90-
integrationConfigJson =
91-
[[
92-
... INSERT INTEGRATION CONFIG ...
93-
]]
90+
function()
91+
integrationConfigJson =
92+
[[
93+
... INSERT INTEGRATION CONFIG ...
94+
]]
9495
95-
initRequiredHelpers(request_rec)
96+
initRequiredHelpers(request_rec)
9697
97-
kuHandler = require("KnownUserApacheHandler")
98+
kuHandler = require("KnownUserApacheHandler")
9899
99-
return kuHandler.handleByIntegrationConfig(
100-
"... INSERT CUSTOMER ID ...",
101-
"... INSERT SECRET KEY ...",
102-
integrationConfigJson,
103-
request_rec)
100+
return kuHandler.handleByIntegrationConfig(
101+
"... INSERT CUSTOMER ID ...",
102+
"... INSERT SECRET KEY ...",
103+
integrationConfigJson,
104+
request_rec)
105+
end
104106
)
105107
106108
if (success) then
@@ -128,25 +130,27 @@ The following is an example of how the handle function would look if the configu
128130
function handle(request_rec)
129131
local success, result = pcall
130132
(
131-
local models = require("Models")
132-
eventconfig = models.QueueEventConfig.create()
133-
eventconfig.eventId = ""; -- ID of the queue to use
134-
eventconfig.queueDomain = "xxx.queue-it.net"; -- Domain name of the queue, usually in the format [CustomerId].queue-it.net
135-
-- eventconfig.cookieDomain = ".my-shop.com"; -- Optional, domain name where the Queue-it session cookie should be saved
136-
eventconfig.cookieValidityMinute = 15; -- Optional, validity of the Queue-it session cookie. Default is 10 minutes.
137-
eventconfig.extendCookieValidity = true; -- Optional, should the Queue-it session cookie validity time be extended each time the validation runs? Default is true.
138-
-- eventconfig.culture = "en-US"; -- Optional, culture of the queue ticket layout in the format specified here: https:-- msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx Default is to use what is specified on Event
139-
-- eventconfig.layoutName = "NameOfYourCustomLayout"; -- Optional, name of the queue ticket layout e.g. "Default layout by Queue-it". Default is to take what is specified on the Event
140-
141-
initRequiredHelpers(request_rec)
142-
143-
kuHandler = require("KnownUserApacheHandler")
133+
function()
134+
local models = require("Models")
135+
eventconfig = models.QueueEventConfig.create()
136+
eventconfig.eventId = ""; -- ID of the queue to use
137+
eventconfig.queueDomain = "xxx.queue-it.net"; -- Domain name of the queue, usually in the format [CustomerId].queue-it.net
138+
-- eventconfig.cookieDomain = ".my-shop.com"; -- Optional, domain name where the Queue-it session cookie should be saved
139+
eventconfig.cookieValidityMinute = 15; -- Optional, validity of the Queue-it session cookie. Default is 10 minutes.
140+
eventconfig.extendCookieValidity = true; -- Optional, should the Queue-it session cookie validity time be extended each time the validation runs? Default is true.
141+
-- eventconfig.culture = "en-US"; -- Optional, culture of the queue ticket layout in the format specified here: https:-- msdn.microsoft.com/en-us/library/ee825488(v=cs.20).aspx Default is to use what is specified on Event
142+
-- eventconfig.layoutName = "NameOfYourCustomLayout"; -- Optional, name of the queue ticket layout e.g. "Default layout by Queue-it". Default is to take what is specified on the Event
143+
144+
initRequiredHelpers(request_rec)
145+
146+
kuHandler = require("KnownUserApacheHandler")
144147
145-
return kuHandler.handleByLocalConfig(
146-
"... INSERT CUSTOMER ID ...",
147-
"... INSERT SECRET KEY ...",
148-
eventconfig,
149-
request_rec)
148+
return kuHandler.handleByLocalConfig(
149+
"... INSERT CUSTOMER ID ...",
150+
"... INSERT SECRET KEY ...",
151+
eventconfig,
152+
request_rec)
153+
end
150154
)
151155
152156
if (success) then

0 commit comments

Comments
 (0)