Finish guards, add channel info route.

This commit is contained in:
Paul Makles
2020-01-26 15:32:31 +00:00
parent 955e482dae
commit 5262095bed
3 changed files with 35 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ impl<'r> FromParam<'r> for Channel {
if let Some(channel) = result {
Ok(Channel (
Ulid::from_string(channel.get_str("_id").unwrap()).unwrap(),
ChannelType::try_from(channel.get_i32("username").unwrap() as usize).unwrap(),
ChannelType::try_from(channel.get_i32("type").unwrap() as usize).unwrap(),
channel
))
} else {