Skip to content

Commit

Permalink
feat: use json for image upload
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbchron committed Mar 1, 2024
1 parent 51da583 commit 5c6b2d1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/bl/src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashMap;
#[cfg(feature = "ssr")]
use color_eyre::eyre::Result;
use core_types::{PhotoGroupRecordId, PhotoGroupUploadParams, PhotoRecordId};
use leptos::{server, ServerFnError};
use leptos::{server, server_fn::codec::Json, ServerFnError};
use strum::{Display, EnumString};

fn thumbnail_size(aspect_ratio: f32) -> (u32, u32) {
Expand All @@ -21,7 +21,10 @@ pub enum PhotoUploadError {
InternalError(String),
}

#[server]
#[server(
input = Json,
output = Json,
)]
#[cfg_attr(feature = "ssr", tracing::instrument)]
pub async fn upload_photo_group(
params: PhotoGroupUploadParams,
Expand Down

0 comments on commit 5c6b2d1

Please sign in to comment.