Skip to content

Commit 04b410e

Browse files
author
Zeyla Hellyer
committed
[http] Fix some routing issues
Fix the following issues with the routing: - AddMemberRole now POSTs instead of DELETEs - GuildBanUser now POSTs instead of DELETEs - CreateRole now POSTs instead of DELETEs - CreateWebhook now POSTs instead of DELETEs These issues arose from commit hash bbbf638.
1 parent d1266fc commit 04b410e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/http/routing.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ impl<'a> RouteInfo<'a> {
921921
Cow::from(Route::group_recipient(group_id, user_id)),
922922
),
923923
RouteInfo::AddMemberRole { guild_id, role_id, user_id } => (
924-
LightMethod::Delete,
924+
LightMethod::Post,
925925
Route::GuildsIdMembersIdRolesId(guild_id),
926926
Cow::from(Route::guild_member_role(guild_id, user_id, role_id)),
927927
),
@@ -932,7 +932,7 @@ impl<'a> RouteInfo<'a> {
932932
user_id,
933933
} => (
934934
// TODO
935-
LightMethod::Delete,
935+
LightMethod::Post,
936936
Route::GuildsIdBansUserId(guild_id),
937937
Cow::from(Route::guild_ban_optioned(
938938
guild_id,
@@ -997,12 +997,12 @@ impl<'a> RouteInfo<'a> {
997997
)),
998998
),
999999
RouteInfo::CreateRole { guild_id } => (
1000-
LightMethod::Delete,
1000+
LightMethod::Post,
10011001
Route::GuildsIdRoles(guild_id),
10021002
Cow::from(Route::guild_roles(guild_id)),
10031003
),
10041004
RouteInfo::CreateWebhook { channel_id } => (
1005-
LightMethod::Delete,
1005+
LightMethod::Post,
10061006
Route::ChannelsIdWebhooks(channel_id),
10071007
Cow::from(Route::channel_webhooks(channel_id)),
10081008
),

0 commit comments

Comments
 (0)