This commit is contained in:
parent
2a7a2ffc99
commit
50a0799f28
@ -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<String>,
|
||||
pub options: Option<Value>,
|
||||
pub data: Option<Vec<u8>>,
|
||||
pub user_id: i32,
|
||||
pub is_shared: bool,
|
||||
@ -291,7 +292,7 @@ impl From<rtss_db::model::DraftDataModel> 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,
|
||||
|
Loading…
Reference in New Issue
Block a user