Skip to content

Commit 33a9fa6

Browse files
committed
remove unused import in custom_url
1 parent c282cfe commit 33a9fa6

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

src/endpoints/admin/custom_api/create_custom_api.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ use mongodb::bson::doc;
1212
use mongodb::options::FindOneOptions;
1313
use serde::Deserialize;
1414
use serde_json::json;
15-
use starknet::core::types::FieldElement;
16-
use std::str::FromStr;
1715
use std::sync::Arc;
1816

1917
pub_struct!(Deserialize; CreateCustomAPI {
@@ -62,6 +60,7 @@ pub async fn handler(
6260
cta: body.cta.clone(),
6361
verify_endpoint: "quests/verify_custom_api".to_string(),
6462
verify_endpoint_type: "default".to_string(),
63+
calls: None,
6564
task_type: Some("custom_api".to_string()),
6665
discord_guild_id: None,
6766
quiz_name: None,

src/endpoints/admin/custom_api/update_custom_api.rs

-7
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ use axum_auto_routes::route;
1212
use mongodb::bson::doc;
1313
use serde::Deserialize;
1414
use serde_json::json;
15-
use starknet::core::types::FieldElement;
16-
use std::str::FromStr;
1715
use std::sync::Arc;
1816

1917
pub_struct!(Deserialize; UpdateCustomAPI {
@@ -26,11 +24,6 @@ pub_struct!(Deserialize; UpdateCustomAPI {
2624
regex: Option<String>,
2725
});
2826

29-
// Helper function to convert FieldElement to Bson
30-
fn field_element_to_bson(fe: &FieldElement) -> mongodb::bson::Bson {
31-
mongodb::bson::Bson::String(fe.to_string())
32-
}
33-
3427
#[route(post, "/admin/tasks/custom_api/update", auth_middleware)]
3528
pub async fn handler(
3629
State(state): State<Arc<AppState>>,

src/models.rs

-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ pub struct QuestTaskDocument {
126126
pub verify_endpoint: String,
127127
pub href: String,
128128
pub verify_endpoint_type: String,
129-
pub api_url: Option<String>,
130-
pub regex: Option<String>,
131129
pub calls: Option<Vec<Call>>,
132130
#[serde(default)]
133131
pub verify_redirect: Option<String>,

0 commit comments

Comments
 (0)