add "random" endpoint that just redirects you to a random node. #1

Merged
erika merged 2 commits from :random into main 2024-03-31 18:23:12 +00:00
Contributor

no hash required.

no hash required.
nebkor added 1 commit 2024-03-31 18:14:56 +00:00
erika requested changes 2024-03-31 18:17:58 +00:00
@ -58,0 +60,4 @@
fn handle_random() {
let db_path = "members.db"
use conn <- sqlight.with_connection(db_path)
let next =
Owner

can we rename next to random?

can we rename `next` to `random`?
nebkor marked this conversation as resolved
@ -58,0 +66,4 @@
on: conn,
expecting: dynamic.decode1(Row, dynamic.element(0, dynamic.string)),
)
case next {
Owner

And here

And here
nebkor marked this conversation as resolved
@ -58,0 +67,4 @@
expecting: dynamic.decode1(Row, dynamic.element(0, dynamic.string)),
)
case next {
Ok([Row(next_link)]) -> wisp.redirect(next_link)
Owner

and here

and here
nebkor marked this conversation as resolved
nebkor added 1 commit 2024-03-31 18:20:10 +00:00
erika merged commit ef084f3dba into main 2024-03-31 18:23:12 +00:00
nebkor deleted branch random 2024-03-31 18:31:40 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: erika/ring#1
No description provided.