Skip to content

Commit

Permalink
[routing] Fix various incorrect routes. (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lymia authored and zeyla committed Aug 9, 2018
1 parent cf68820 commit 826220f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/http/routing.rs
Expand Up @@ -916,12 +916,12 @@ impl<'a> RouteInfo<'a> {
pub fn deconstruct(&self) -> (LightMethod, Route, Cow<str>) {
match *self {
RouteInfo::AddGroupRecipient { group_id, user_id } => (
LightMethod::Post,
LightMethod::Put,
Route::None,
Cow::from(Route::group_recipient(group_id, user_id)),
),
RouteInfo::AddMemberRole { guild_id, role_id, user_id } => (
LightMethod::Post,
LightMethod::Put,
Route::GuildsIdMembersIdRolesId(guild_id),
Cow::from(Route::guild_member_role(guild_id, user_id, role_id)),
),
Expand All @@ -932,7 +932,7 @@ impl<'a> RouteInfo<'a> {
user_id,
} => (
// TODO
LightMethod::Post,
LightMethod::Put,
Route::GuildsIdBansUserId(guild_id),
Cow::from(Route::guild_ban_optioned(
guild_id,
Expand Down Expand Up @@ -977,7 +977,7 @@ impl<'a> RouteInfo<'a> {
Cow::from(Route::channel_messages(channel_id, None)),
),
RouteInfo::CreatePermission { channel_id, target_id } => (
LightMethod::Post,
LightMethod::Put,
Route::ChannelsIdPermissionsOverwriteId(channel_id),
Cow::from(Route::channel_permission(channel_id, target_id)),
),
Expand Down

0 comments on commit 826220f

Please sign in to comment.