From 1640ef1c59cfe6b6c4f30174d6c845f335a5d3c4 Mon Sep 17 00:00:00 2001 From: Iris Date: Fri, 29 Sep 2023 15:07:55 +0200 Subject: [PATCH] ref: remove twitter fw task avnu --- src/endpoints/quests/avnu/claimable.rs | 4 ++-- src/endpoints/quests/avnu/mod.rs | 1 - .../quests/avnu/verify_twitter_fw.rs | 24 ------------------- src/main.rs | 4 ---- 4 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 src/endpoints/quests/avnu/verify_twitter_fw.rs diff --git a/src/endpoints/quests/avnu/claimable.rs b/src/endpoints/quests/avnu/claimable.rs index ec643dce..9a94c2a7 100644 --- a/src/endpoints/quests/avnu/claimable.rs +++ b/src/endpoints/quests/avnu/claimable.rs @@ -16,8 +16,8 @@ use starknet::{ use std::sync::Arc; const QUEST_ID: u32 = 3; -const TASK_IDS: &[u32] = &[12, 13, 14, 15]; -const LAST_TASK: u32 = TASK_IDS[3]; +const TASK_IDS: &[u32] = &[12, 13, 15]; +const LAST_TASK: u32 = TASK_IDS[2]; const NFT_LEVEL: u32 = 6; #[derive(Deserialize)] diff --git a/src/endpoints/quests/avnu/mod.rs b/src/endpoints/quests/avnu/mod.rs index 26bb1188..76171942 100644 --- a/src/endpoints/quests/avnu/mod.rs +++ b/src/endpoints/quests/avnu/mod.rs @@ -1,5 +1,4 @@ pub mod claimable; pub mod discord_fw_callback; pub mod verify_swap; -pub mod verify_twitter_fw; pub mod verify_twitter_rt; diff --git a/src/endpoints/quests/avnu/verify_twitter_fw.rs b/src/endpoints/quests/avnu/verify_twitter_fw.rs deleted file mode 100644 index c006067b..00000000 --- a/src/endpoints/quests/avnu/verify_twitter_fw.rs +++ /dev/null @@ -1,24 +0,0 @@ -use std::sync::Arc; - -use crate::{ - models::{AppState, VerifyQuery}, - utils::{get_error, CompletedTasksTrait}, -}; -use axum::{ - extract::{Query, State}, - http::StatusCode, - response::IntoResponse, - Json, -}; -use serde_json::json; - -pub async fn handler( - State(state): State>, - Query(query): Query, -) -> impl IntoResponse { - let task_id = 14; - match state.upsert_completed_task(query.addr, task_id).await { - Ok(_) => (StatusCode::OK, Json(json!({"res": true}))).into_response(), - Err(e) => get_error(format!("{}", e)), - } -} diff --git a/src/main.rs b/src/main.rs index 92dcdf45..b9b28092 100644 --- a/src/main.rs +++ b/src/main.rs @@ -139,10 +139,6 @@ async fn main() { "/quests/zklend/claimable", get(endpoints::quests::zklend::claimable::handler), ) - .route( - "/quests/avnu/verify_twitter_fw", - get(endpoints::quests::avnu::verify_twitter_fw::handler), - ) .route( "/quests/avnu/verify_twitter_rt", get(endpoints::quests::avnu::verify_twitter_rt::handler),