33 lines
826 B
V
33 lines
826 B
V
module web
|
|
|
|
//import freeflowuniverse.crystallib.osal
|
|
import veb
|
|
// import rand
|
|
// import os
|
|
// import json
|
|
// import freeflowuniverse.crystallib.webserver.auth.jwt
|
|
// import time
|
|
|
|
pub fn (app &App) index(mut ctx Context) veb.Result {
|
|
return ctx.html($tmpl('./templates/index.html'))
|
|
}
|
|
|
|
// @['/api/connection-details'; get]
|
|
// pub fn (app &App) participant_endpoint(mut ctx Context) veb.Result {
|
|
|
|
// @['/blogs/']
|
|
// pub fn (app &App) room(mut ctx Context) veb.Result {
|
|
// return ctx.html($tmpl('./templates/room.html'))
|
|
// }
|
|
|
|
// pub fn (app &App) custom(mut ctx Context) veb.Result {
|
|
// dollar := '$'
|
|
// return ctx.html($tmpl('./templates/blog-list-grid.html'))
|
|
// }
|
|
|
|
// // Custom 404 handler
|
|
pub fn (mut ctx Context) not_found() veb.Result {
|
|
ctx.res.set_status(.not_found)
|
|
return ctx.html('<h1>Page not found!</h1>')
|
|
}
|