File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -314,16 +314,10 @@ Example
314314``` Lua
315315 -- Tarantool, stored procedure
316316 function foo (req )
317- return
318- -- First arg. if __ngx exists and tnt_eval is used, then it will be
319- -- readed by nginx
320- {
321- ngx = {
322- 200 , -- set status HTTP 200
323- { [" X-Tarantool" ] = " FROM_TNT" } -- set headers
324- }
325- },
326- req ,
317+ return {
318+ 200 , -- set status HTTP 200
319+ { [" X-Tarantool" ] = " FROM_TNT" } -- set headers
320+ }
327321
328322 end
329323```
@@ -371,8 +365,8 @@ Example
371365 local result = answ["result"]
372366
373367 if result ~= nil then
374- ngx.status = result[1]["ngx"][1]
375- for k, v in pairs(result[1]["ngx"][ 2]) do
368+ ngx.status = result[1]
369+ for k, v in pairs(result[2]) do
376370 ngx.header[k] = v
377371 end
378372
You can’t perform that action at this time.
0 commit comments