[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 wisp.{type Request, type Response}
import gleam/string_builder
import gleam/http.{Get} import gleam/http.{Get}
import gleam/io
import gleam/list import gleam/list
import gleam/result import gleam/result
import gleam/dynamic import gleam/dynamic
@ -86,7 +84,7 @@ fn home_page(req: Request) -> Response {
use conn <- sqlight.with_connection(db_path) use conn <- sqlight.with_connection(db_path)
let members = let members =
sqlight.query( sqlight.query(
"select member from ring", "select member from ring order by member asc",
on: conn, on: conn,
with: [], 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)), expecting: dynamic.decode1(Row, dynamic.element(0, dynamic.string)),