Skip to content

Commit

Permalink
init: update logic and code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
BRAVO68WEB committed Dec 25, 2023
1 parent 4f43208 commit 130f235
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# pay_n_ticketing module for (RCSCTF24)

## Description

This module is used to pay for tickets and register for interest for RCSCTF24.

## Technologies used

- Rust
- Shuttle.rs
- Axum

## Payment Integration

- Razorpay
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ async fn axum(
#[shuttle_turso::Turso(addr = "{secrets.DB_TURSO_URI}", token = "{secrets.DB_TURSO_TOKEN}", local_addr = "{secrets.DB_TURSO_URI}")]
sql_client: Client,
) -> shuttle_axum::ShuttleAxum {
sql_client.execute("CREATE TABLE IF NOT EXISTS interest (id TEXT PRIMARY KEY, name TEXT, email TEXT, contact_no TEXT, uni_id TEXT, uni_name TEXT, where_you_reside TEXT, created_at TEXT)").await.unwrap();

let sql_client = sql_client;
let ev_state: Arc<EnvStore> = Arc::new(EnvStore {
rpay_id: secret_store.get("RAZOR_PAY_KEY_ID").unwrap(),
Expand All @@ -189,7 +187,7 @@ async fn axum(
});

let router = Router::new()
.route("/hello", get(hello_world))
.route("/", get(hello_world))
.route("/order", post(generate_order))
.route("/interest", post(register_interest))
.with_state(state);
Expand Down

0 comments on commit 130f235

Please sign in to comment.