Allow POST requests for invite tokens

This commit is contained in:
Cecylia Bocovich 2023-03-01 20:05:51 -05:00
parent 7bf91edbaa
commit 9e2d341751
1 changed files with 1 additions and 0 deletions

View File

@ -98,6 +98,7 @@ async fn handle(
.unwrap()), .unwrap()),
_ => match (req.method(), req.uri().path()) { _ => match (req.method(), req.uri().path()) {
(&Method::GET, "/invite") => Ok::<_, Infallible>(generate_invite(context.db)), (&Method::GET, "/invite") => Ok::<_, Infallible>(generate_invite(context.db)),
(&Method::POST, "/invite") => Ok::<_, Infallible>(generate_invite(context.db)),
(&Method::GET, "/reachability") => Ok::<_, Infallible>(send_reachability_cred(context.ba)), (&Method::GET, "/reachability") => Ok::<_, Infallible>(send_reachability_cred(context.ba)),
(&Method::GET, "/pubkeys") => Ok::<_, Infallible>(send_keys(context.ba)), (&Method::GET, "/pubkeys") => Ok::<_, Infallible>(send_keys(context.ba)),
(&Method::POST, "/openreq") => Ok::<_, Infallible>({ (&Method::POST, "/openreq") => Ok::<_, Infallible>({