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

app:before_filter(json_params) not work? #786

Open
izxyz opened this issue May 17, 2024 · 1 comment
Open

app:before_filter(json_params) not work? #786

izxyz opened this issue May 17, 2024 · 1 comment

Comments

@izxyz
Copy link

izxyz commented May 17, 2024

local lapis = require("lapis")
local app = lapis.Application()

local json_params = require("lapis.application").json_params

app:before_filter(json_params)

@izxyz izxyz closed this as completed May 17, 2024
@izxyz izxyz reopened this May 19, 2024
@karai17
Copy link

karai17 commented Jun 5, 2024

json_params is a function that you wrap around your before/actions.

local lapis = require("lapis")
local app = lapis.Application()

local json_params = require("lapis.application").json_params

app:before_filter(json_params(function(self)
  -- do your "before" things here
end))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants