Improve consistency in declared field order of media endpoints

This commit is contained in:
Jonas Platte 2020-10-11 13:22:57 +02:00
parent f4fc20921a
commit 3e5cea289c
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
2 changed files with 8 additions and 8 deletions

View File

@ -13,6 +13,10 @@ ruma_api! {
}
request: {
/// The file contents to upload.
#[ruma_api(raw_body)]
pub file: Vec<u8>,
/// The name of the file being uploaded.
#[ruma_api(query)]
#[serde(skip_serializing_if = "Option::is_none")]
@ -21,10 +25,6 @@ ruma_api! {
/// The content type of the file being uploaded.
#[ruma_api(header = CONTENT_TYPE)]
pub content_type: Option<&'a str>,
/// The file contents to upload.
#[ruma_api(raw_body)]
pub file: Vec<u8>,
}
response: {

View File

@ -59,13 +59,13 @@ ruma_api! {
}
response: {
/// The content type of the thumbnail.
#[ruma_api(header = CONTENT_TYPE)]
pub content_type: Option<String>,
/// A thumbnail of the requested content.
#[ruma_api(raw_body)]
pub file: Vec<u8>,
/// The content type of the thumbnail.
#[ruma_api(header = CONTENT_TYPE)]
pub content_type: Option<String>,
}
error: crate::Error