diff options
author | Adam T. Carpenter <atc@53hor.net> | 2020-11-02 20:36:18 -0500 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2020-11-02 20:36:18 -0500 |
commit | dcc96d0b349583e5d6a0f25ae1f7a3ffa3769788 (patch) | |
tree | 98a9cc9d322e309c05db400f4c536164bee4daac /dichroism/src/dtos/photo_set_get.rs | |
parent | 9480317011b57d3be7b903048f4a85d02979c7c7 (diff) | |
download | theglassyladies-dcc96d0b349583e5d6a0f25ae1f7a3ffa3769788.tar.xz theglassyladies-dcc96d0b349583e5d6a0f25ae1f7a3ffa3769788.zip |
swapped json payload url encoded images for multipart form data
Diffstat (limited to 'dichroism/src/dtos/photo_set_get.rs')
-rw-r--r-- | dichroism/src/dtos/photo_set_get.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dichroism/src/dtos/photo_set_get.rs b/dichroism/src/dtos/photo_set_get.rs new file mode 100644 index 0000000..0736617 --- /dev/null +++ b/dichroism/src/dtos/photo_set_get.rs @@ -0,0 +1,22 @@ +use crate::models::PhotoSet; + +#[derive(Debug, Serialize)] +pub struct PhotoSetGet { + pub id: i32, + pub original: String, + pub fullsize: String, + pub base: String, + pub thumbnail: String, +} + +impl From<PhotoSet> for PhotoSetGet { + fn from(p: PhotoSet) -> Self { + Self { + id: p.id.unwrap_or(-1), + original: p.original.id, + fullsize: p.fullsize.id, + base: p.base.id, + thumbnail: p.thumbnail.id, + } + } +} |