Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
added missing function()...end to pcall in sample code
  • Loading branch information
frwiqueueit authored Nov 6, 2019
1 parent 02d2af5 commit 5446449
Showing 1 changed file with 33 additions and 29 deletions.
62 changes: 33 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,22 @@ end
function handle(request_rec)
local success, result = pcall
(
integrationConfigJson =
[[
... INSERT INTEGRATION CONFIG ...
]]
function()
integrationConfigJson =
[[
... INSERT INTEGRATION CONFIG ...
]]
initRequiredHelpers(request_rec)
initRequiredHelpers(request_rec)
kuHandler = require("KnownUserApacheHandler")
kuHandler = require("KnownUserApacheHandler")
return kuHandler.handleByIntegrationConfig(
"... INSERT CUSTOMER ID ...",
"... INSERT SECRET KEY ...",
integrationConfigJson,
request_rec)
return kuHandler.handleByIntegrationConfig(
"... INSERT CUSTOMER ID ...",
"... INSERT SECRET KEY ...",
integrationConfigJson,
request_rec)
end
)
if (success) then
Expand Down Expand Up @@ -128,25 +130,27 @@ The following is an example of how the handle function would look if the configu
function handle(request_rec)
local success, result = pcall
(
local models = require("Models")
eventconfig = models.QueueEventConfig.create()
eventconfig.eventId = ""; -- ID of the queue to use
eventconfig.queueDomain = "xxx.queue-it.net"; -- Domain name of the queue, usually in the format [CustomerId].queue-it.net
-- eventconfig.cookieDomain = ".my-shop.com"; -- Optional, domain name where the Queue-it session cookie should be saved
eventconfig.cookieValidityMinute = 15; -- Optional, validity of the Queue-it session cookie. Default is 10 minutes.
eventconfig.extendCookieValidity = true; -- Optional, should the Queue-it session cookie validity time be extended each time the validation runs? Default is true.
-- 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
-- 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
initRequiredHelpers(request_rec)
kuHandler = require("KnownUserApacheHandler")
function()
local models = require("Models")
eventconfig = models.QueueEventConfig.create()
eventconfig.eventId = ""; -- ID of the queue to use
eventconfig.queueDomain = "xxx.queue-it.net"; -- Domain name of the queue, usually in the format [CustomerId].queue-it.net
-- eventconfig.cookieDomain = ".my-shop.com"; -- Optional, domain name where the Queue-it session cookie should be saved
eventconfig.cookieValidityMinute = 15; -- Optional, validity of the Queue-it session cookie. Default is 10 minutes.
eventconfig.extendCookieValidity = true; -- Optional, should the Queue-it session cookie validity time be extended each time the validation runs? Default is true.
-- 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
-- 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
initRequiredHelpers(request_rec)
kuHandler = require("KnownUserApacheHandler")
return kuHandler.handleByLocalConfig(
"... INSERT CUSTOMER ID ...",
"... INSERT SECRET KEY ...",
eventconfig,
request_rec)
return kuHandler.handleByLocalConfig(
"... INSERT CUSTOMER ID ...",
"... INSERT SECRET KEY ...",
eventconfig,
request_rec)
end
)
if (success) then
Expand Down

0 comments on commit 5446449

Please sign in to comment.