diff --git a/server-api/src/channels.rs b/server-api/src/channels.rs index 8f1a2ad..2126f41 100644 --- a/server-api/src/channels.rs +++ b/server-api/src/channels.rs @@ -21,8 +21,8 @@ pub async fn list_channels(pool: &Pool, response: &mut Response) { */ return match db::channels::Channel::filter(pool, 0).await { db::Response::Set(channels) => { - response.headers_mut().insert("Content type", - HeaderValue::from_static("json/application")); + response.headers_mut().insert("Content-Type", + HeaderValue::from_static("application/json")); *response.body_mut() = Body::from(to_string(&channels).unwrap_or("{}".into())) }, @@ -52,8 +52,8 @@ pub async fn create_channel(pool: &Pool, response: &mut Response, params: // Send the data up to the db, then return the new channel back to the user(?) match db::channels::Channel::add(pool, name, desc, kind.try_into().unwrap()).await { db::Response::Row(row) => { - response.headers_mut().insert("Content type", - HeaderValue::from_static("json/application")); + response.headers_mut().insert("Content-Type", + HeaderValue::from_static("application/json")); *response.body_mut() = Body::from(to_string(&row).unwrap_or("{}".into())); },