Initial project import
This commit is contained in:
commit
23f2d29e32
11957 files changed
+1754577
No files matched your search
@@ -0,0 +1,13 @@
|
||||
module main
|
||||
|
||||
import veb
|
||||
|
||||
@['/controller/auth'; post]
|
||||
pub fn (mut app App) controller_auth(mut ctx Context, username string, password string) veb.Result {
|
||||
response := app.service_auth(username, password) or {
|
||||
ctx.res.set_status(.bad_request)
|
||||
return ctx.text('error: ${err}')
|
||||
}
|
||||
|
||||
return ctx.json(response)
|
||||
}
|
||||
Reference in new issue
Block a user