Skip to content

Commit e498f35

Browse files
committed
fix(sign-doc): content type
Signed-off-by: bkioshn <[email protected]>
1 parent 7080c53 commit e498f35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rust/signed_doc/src/metadata/content_type.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ impl ContentType {
4040
impl Display for ContentType {
4141
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> {
4242
match self {
43-
Self::Cbor => write!(f, "cbor"),
44-
Self::Json => write!(f, "json"),
43+
Self::Cbor => write!(f, "application/cbor"),
44+
Self::Json => write!(f, "application/json"),
4545
}
4646
}
4747
}
@@ -51,8 +51,8 @@ impl FromStr for ContentType {
5151

5252
fn from_str(s: &str) -> Result<Self, Self::Err> {
5353
match s {
54-
"cbor" => Ok(Self::Cbor),
55-
"json" => Ok(Self::Json),
54+
"application/cbor" => Ok(Self::Cbor),
55+
"application/json" => Ok(Self::Json),
5656
_ => {
5757
anyhow::bail!(
5858
"Unsupported Content Type: {s:?}, Supported only: {:?}",

0 commit comments

Comments
 (0)