mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 01:38:44 +00:00
rename response fields to be in line with others
This commit is contained in:
1 parent
993d60a746
commit
2ea38f0ff4
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -19,7 +19,7 @@ use crate::server_state::ServerState;
|
||||
#[derive(Serialize, ToSchema)]
|
||||
pub struct ListFeaturedMediaFilesSuccessResponse {
|
||||
pub success: bool,
|
||||
pub media_files: Vec<MediaFile>,
|
||||
pub results: Vec<MediaFile>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, ToSchema)]
|
||||
@@ -123,7 +123,7 @@ pub async fn list_featured_media_files_handler(
|
||||
|
||||
let response = ListFeaturedMediaFilesSuccessResponse {
|
||||
success: true,
|
||||
media_files: media_files.into_iter()
|
||||
results: media_files.into_iter()
|
||||
.map(|m| {
|
||||
let public_bucket_path = MediaFileBucketPath::from_object_hash(
|
||||
&m.public_bucket_directory_hash,
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ use crate::server_state::ServerState;
|
||||
#[derive(Serialize, ToSchema)]
|
||||
pub struct ListFeaturedWeightsSuccessResponse {
|
||||
pub success: bool,
|
||||
pub weights: Vec<ModelWeightForList>,
|
||||
pub results: Vec<ModelWeightForList>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, ToSchema)]
|
||||
@@ -127,7 +127,7 @@ pub async fn list_featured_weights_handler(
|
||||
|
||||
let response = ListFeaturedWeightsSuccessResponse {
|
||||
success: true,
|
||||
weights: weights.into_iter()
|
||||
results: weights.into_iter()
|
||||
.map(|w| {
|
||||
|
||||
let maybe_cover_image = w.maybe_cover_image_public_bucket_hash
|
||||
|
||||
Reference in new issue
Block a user