[ring] Add index page at root path #2

Merged
erika merged 2 commits from index into main 2024-03-31 18:49:30 +00:00
Showing only changes of commit 235c402efb - Show all commits

View file

@ -1,7 +1,5 @@
import wisp.{type Request, type Response}
import gleam/string_builder
import gleam/http.{Get}
import gleam/io
import gleam/list
import gleam/result
import gleam/dynamic
@ -86,7 +84,7 @@ fn home_page(req: Request) -> Response {
use conn <- sqlight.with_connection(db_path)
let members =
sqlight.query(
"select member from ring",
"select member from ring order by member asc",
on: conn,
with: [],
erika marked this conversation as resolved
Review

maybe order by member (url) rather than implicit id?

maybe order by member (url) rather than implicit id?
expecting: dynamic.decode1(Row, dynamic.element(0, dynamic.string)),