init
This commit is contained in:
@@ -32,6 +32,7 @@ pub struct EmojiResponse {
|
||||
pub emoji_type: String,
|
||||
pub unicode_sequence: Option<String>,
|
||||
pub name: String,
|
||||
pub supports_skin_tone: bool,
|
||||
pub asset_url: Option<String>,
|
||||
pub mime_type: Option<String>,
|
||||
pub file_size: Option<i64>,
|
||||
|
||||
@@ -10,6 +10,7 @@ pub struct Model {
|
||||
pub id: Uuid,
|
||||
pub server_id: Option<Uuid>,
|
||||
pub name: String,
|
||||
pub supports_skin_tone: bool,
|
||||
pub emoji_type: String,
|
||||
pub unicode_sequence: Option<String>,
|
||||
pub file_path: Option<String>,
|
||||
|
||||
@@ -137,6 +137,7 @@ pub async fn create(
|
||||
id: Set(id),
|
||||
server_id: Set(server_id),
|
||||
name: Set(String::new()),
|
||||
supports_skin_tone: Set(false),
|
||||
emoji_type: Set(emoji_type),
|
||||
unicode_sequence: Set(unicode_sequence),
|
||||
file_path: Set(path),
|
||||
|
||||
@@ -7,6 +7,7 @@ pub fn response(model: emoji::Model) -> EmojiResponse {
|
||||
emoji_type: model.emoji_type,
|
||||
unicode_sequence: model.unicode_sequence,
|
||||
name: model.name,
|
||||
supports_skin_tone: model.supports_skin_tone,
|
||||
asset_url: model
|
||||
.file_path
|
||||
.as_ref()
|
||||
|
||||
Reference in New Issue
Block a user