add auth endpoint for on_publish

This commit is contained in:
2021-05-11 20:44:42 +02:00
parent a2ad5e3d8c
commit e9bb401170
3 changed files with 30 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
local autoload = require("lapis.util").autoload
local function Authhandler(self)
local name = self.params.name
local password = self.params.password
print(name)
print(password)
local endpoints = {
puik='something',
wstd='something',
buzz='something'
}
if endpoints[name] == password then
return {status = 201}
else
return {status = 404}
end
end
return Authhandler