add "random" endpoint that just redirects you to a random node. #1
Loading…
Reference in a new issue
No description provided.
Delete branch ":random"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
no hash required.
@ -58,0 +60,4 @@
fn handle_random() {
let db_path = "members.db"
use conn <- sqlight.with_connection(db_path)
let next =
can we rename
next
torandom
?@ -58,0 +66,4 @@
on: conn,
expecting: dynamic.decode1(Row, dynamic.element(0, dynamic.string)),
)
case next {
And here
@ -58,0 +67,4 @@
expecting: dynamic.decode1(Row, dynamic.element(0, dynamic.string)),
)
case next {
Ok([Row(next_link)]) -> wisp.redirect(next_link)
and here