Skip to content

Commit

Permalink
remove unused import in custom_url
Browse files Browse the repository at this point in the history
  • Loading branch information
GideonBature committed Sep 28, 2024
1 parent c282cfe commit 33a9fa6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
3 changes: 1 addition & 2 deletions src/endpoints/admin/custom_api/create_custom_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ use mongodb::bson::doc;
use mongodb::options::FindOneOptions;
use serde::Deserialize;
use serde_json::json;
use starknet::core::types::FieldElement;
use std::str::FromStr;
use std::sync::Arc;

pub_struct!(Deserialize; CreateCustomAPI {
Expand Down Expand Up @@ -62,6 +60,7 @@ pub async fn handler(
cta: body.cta.clone(),
verify_endpoint: "quests/verify_custom_api".to_string(),
verify_endpoint_type: "default".to_string(),
calls: None,
task_type: Some("custom_api".to_string()),
discord_guild_id: None,
quiz_name: None,
Expand Down
7 changes: 0 additions & 7 deletions src/endpoints/admin/custom_api/update_custom_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ use axum_auto_routes::route;
use mongodb::bson::doc;
use serde::Deserialize;
use serde_json::json;
use starknet::core::types::FieldElement;
use std::str::FromStr;
use std::sync::Arc;

pub_struct!(Deserialize; UpdateCustomAPI {
Expand All @@ -26,11 +24,6 @@ pub_struct!(Deserialize; UpdateCustomAPI {
regex: Option<String>,
});

// Helper function to convert FieldElement to Bson
fn field_element_to_bson(fe: &FieldElement) -> mongodb::bson::Bson {
mongodb::bson::Bson::String(fe.to_string())
}

#[route(post, "/admin/tasks/custom_api/update", auth_middleware)]
pub async fn handler(
State(state): State<Arc<AppState>>,
Expand Down
2 changes: 0 additions & 2 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ pub struct QuestTaskDocument {
pub verify_endpoint: String,
pub href: String,
pub verify_endpoint_type: String,
pub api_url: Option<String>,
pub regex: Option<String>,
pub calls: Option<Vec<Call>>,
#[serde(default)]
pub verify_redirect: Option<String>,
Expand Down

0 comments on commit 33a9fa6

Please sign in to comment.