From 11d09e93688b8f1a47b6e51471552129570b92be Mon Sep 17 00:00:00 2001 From: 641i130 <46945263+641i130@users.noreply.github.com> Date: Sat, 4 Nov 2023 17:51:50 -0500 Subject: [PATCH] cardn.cgi finalized --- src/main.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index c519e45..eb1295d 100755 --- a/src/main.rs +++ b/src/main.rs @@ -136,13 +136,14 @@ async fn cardn(web::Form(form): web::Form) -> HttpResponse { println!("READ"); resp!(format!("1\n1,1\n{}",form.card_no)) }, - Some(CardCmd::REGISTER) => { - println!("REGISTER"); - resp!("") - }, Some(CardCmd::REISSUE) => { println!("REISSUE"); - resp!("") + resp!("27") + }, + Some(CardCmd::REGISTER) => { + println!("REGISTER"); + // Add user into database later + resp!(format!("1\n1,1\n{}",form.card_no)) }, _ => HttpResponse::NotFound().into() }