From c88a0b2398244af72e0f78aa4b3109c34e7d8e33 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 3 Mar 2026 13:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=92=8C=E8=AD=A6=E5=91=8A:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BC=BA=E5=A4=B1=E7=9A=84=E5=AF=BC=E5=85=A5=EF=BC=8C=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84=E5=AF=BC=E5=85=A5?= =?UTF-8?q?=E5=92=8C=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/handler/point.rs | 3 ++- src/handler/tag.rs | 2 +- src/main.rs | 2 +- src/service.rs | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/handler/point.rs b/src/handler/point.rs index b90a54d..6ac5e78 100644 --- a/src/handler/point.rs +++ b/src/handler/point.rs @@ -1,7 +1,8 @@ -锘縰se axum::{Json, extract::{Path, Query, State}, http::HeaderMap, response::IntoResponse}; +use axum::{Json, extract::{Path, Query, State}, http::HeaderMap, response::IntoResponse}; use serde::{Deserialize, Serialize}; use uuid::Uuid; use validator::Validate; +use sqlx::Row; use crate::util::response::ApiErr; diff --git a/src/handler/tag.rs b/src/handler/tag.rs index 06a6e95..8d8fc73 100644 --- a/src/handler/tag.rs +++ b/src/handler/tag.rs @@ -1,5 +1,5 @@ use axum::{Json, extract::{Path, State}, http::StatusCode, response::IntoResponse}; -use serde::{Deserialize, Serialize}; +use serde::Deserialize; use uuid::Uuid; use validator::Validate; diff --git a/src/main.rs b/src/main.rs index 05b0977..312a0cd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,7 +17,7 @@ use connection::ConnectionManager; use event::EventManager; use std::sync::Arc; use axum::{ - routing::get, + routing::{get, put}, Router, }; diff --git a/src/service.rs b/src/service.rs index 92518fc..68a0171 100644 --- a/src/service.rs +++ b/src/service.rs @@ -218,12 +218,12 @@ pub async fn update_tag( let mut updates = Vec::new(); let mut param_count = 1; - if let Some(n) = name { + if let Some(_n) = name { updates.push(format!("name = ${}", param_count)); param_count += 1; } - if let Some(d) = description { + if let Some(_d) = description { updates.push(format!("description = ${}", param_count)); param_count += 1; }