return description for w2l templates

This commit is contained in:
Brandon Thomas committed 2021-08-18 23:27:26 -04:00
1 parent 7719262904
commit c071bcfe1e
1 file changed
+10
@@ -21,6 +21,8 @@ pub struct W2lTemplateRecordForResponse {
pub creator_username: String,
pub creator_display_name: String,
pub title: String,
pub description_markdown: String,
pub description_rendered_html: String,
pub frame_width: u32,
pub frame_height: u32,
pub duration_millis: u32,
@@ -53,6 +55,8 @@ pub struct W2lTemplateRecordRaw {
pub creator_username: String,
pub creator_display_name: String,
pub title: String,
pub description_markdown: String,
pub description_rendered_html: String,
pub frame_width: i32,
pub frame_height: i32,
pub duration_millis: i32,
@@ -105,6 +109,8 @@ pub async fn select_w2l_template_by_token(
creator_username: template.creator_username.clone(),
creator_display_name: template.creator_display_name.clone(),
title: template.title.clone(),
description_markdown: template.description_markdown.clone(),
description_rendered_html: template.description_rendered_html.clone(),
frame_width: if template.frame_width > 0 { template.frame_width as u32 } else { 0 },
frame_height: if template.frame_height > 0 { template.frame_height as u32 } else { 0 },
duration_millis: if template.duration_millis > 0 { template.duration_millis as u32 } else { 0 },
@@ -143,6 +149,8 @@ SELECT
users.username as creator_username,
users.display_name as creator_display_name,
w2l.title,
w2l.description_markdown,
w2l.description_rendered_html,
w2l.frame_width,
w2l.frame_height,
w2l.duration_millis,
@@ -183,6 +191,8 @@ SELECT
users.username as creator_username,
users.display_name as creator_display_name,
w2l.title,
w2l.description_markdown,
w2l.description_rendered_html,
w2l.frame_width,
w2l.frame_height,
w2l.duration_millis,