From 50a0799f28b49fa5c0dda84ffddf4be4c42fbbd9 Mon Sep 17 00:00:00 2001 From: soul-walker <31162815+soul-walker@users.noreply.github.com> Date: Thu, 19 Sep 2024 09:07:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8D=89=E7=A8=BFapi?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/rtss_api/src/draft_data.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/rtss_api/src/draft_data.rs b/crates/rtss_api/src/draft_data.rs index ed51af4..946f216 100644 --- a/crates/rtss_api/src/draft_data.rs +++ b/crates/rtss_api/src/draft_data.rs @@ -8,6 +8,7 @@ use rtss_db::RtssDbAccessor; use rtss_dto::common::{DataType, IscsStyle}; use serde::de::DeserializeOwned; use serde::{Deserialize, Serialize}; +use serde_json::Value; use crate::pagination::PageQueryDto; @@ -277,7 +278,7 @@ pub struct DraftDataWithStringOptions { pub id: i32, pub name: String, pub data_type: rtss_dto::common::DataType, - pub options: Option, + pub options: Option, pub data: Option>, pub user_id: i32, pub is_shared: bool, @@ -291,7 +292,7 @@ impl From for DraftDataWithStringOptions { id: value.id, name: value.name, data_type: DataType::try_from(value.data_type).unwrap(), - options: value.options.map(|o| serde_json::to_string(&o).unwrap()), + options: value.options, data: value.data, user_id: value.user_id, is_shared: value.is_shared,