* channels are now nested in "channels" key
This commit is contained in:
parent
080b2cc538
commit
b999907540
@ -23,7 +23,7 @@ pub async fn list_channels(pool: &Pool, response: &mut Response<Body>) {
|
||||
*/
|
||||
return match db::channels::Channel::filter(pool, 0).await {
|
||||
db::Response::Set(channels) => {
|
||||
set_json_body(response, json!(channels));
|
||||
set_json_body(response, json!({"channels": channels}));
|
||||
},
|
||||
db::Response::Other(_msg) => *response.status_mut() = hyper::StatusCode::INTERNAL_SERVER_ERROR,
|
||||
_ => *response.status_mut() = hyper::StatusCode::INTERNAL_SERVER_ERROR,
|
||||
|
Loading…
Reference in New Issue
Block a user