summaryrefslogtreecommitdiff
path: root/exes/rest/src/handler.rs
diff options
context:
space:
mode:
authorMatthieu Pignolet <matthieu@matthieu-dev.xyz>2023-01-20 16:38:10 +0400
committerGitHub <noreply@github.com>2023-01-20 16:38:10 +0400
commitea1d345147759a4e2822c4145a87485f10d56a69 (patch)
tree5e152f2cd776babea7ad9a6c87b84d8012a39ea4 /exes/rest/src/handler.rs
parent98420c50a81fccab924f646b1f8dd1e55988a4a5 (diff)
Draft: New cross building for docker images (#37)
* Add .circleci/config.yml * base * base * add architectures and cross build * fix clippy warnings
Diffstat (limited to 'exes/rest/src/handler.rs')
-rw-r--r--exes/rest/src/handler.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/exes/rest/src/handler.rs b/exes/rest/src/handler.rs
index 0070081..259ac1a 100644
--- a/exes/rest/src/handler.rs
+++ b/exes/rest/src/handler.rs
@@ -89,7 +89,7 @@ fn normalize_path(request_path: &str) -> (&str, &str) {
("/api", request_path)
}
}
-fn path_name(path: &Path) -> &'static str {
+const fn path_name(path: &Path) -> &'static str {
match path {
Path::ApplicationCommand(..) => "Application commands",
Path::ApplicationCommandId(..) => "Application command",
@@ -112,7 +112,9 @@ fn path_name(path: &Path) -> &'static str {
Path::ChannelsIdThreadMembersId(..) => "Thread member",
Path::ChannelsIdThreads(..) => "Channel threads",
Path::ChannelsIdTyping(..) => "Typing indicator",
- Path::ChannelsIdWebhooks(..) | Path::WebhooksId(..) => "Webhook",
+ Path::ChannelsIdWebhooks(..) | Path::WebhooksId(..) | Path::WebhooksIdToken(..) => {
+ "Webhook"
+ }
Path::Gateway => "Gateway",
Path::GatewayBot => "Gateway bot info",
Path::Guilds => "Guilds",
@@ -146,14 +148,15 @@ fn path_name(path: &Path) -> &'static str {
Path::GuildsIdScheduledEventsIdUsers(..) => "Users of a scheduled event",
Path::GuildsIdStickers(..) => "Guild stickers",
Path::GuildsIdTemplates(..) => "Guild templates",
- Path::GuildsIdTemplatesCode(..) => "Specific guild template",
+ Path::GuildsIdTemplatesCode(..) | Path::GuildsTemplatesCode(..) => {
+ "Specific guild template"
+ }
Path::GuildsIdThreads(..) => "Guild threads",
Path::GuildsIdVanityUrl(..) => "Guild vanity invite",
Path::GuildsIdVoiceStates(..) => "Guild voice states",
Path::GuildsIdWebhooks(..) => "Guild webhooks",
Path::GuildsIdWelcomeScreen(..) => "Guild welcome screen",
Path::GuildsIdWidget(..) => "Guild widget",
- Path::GuildsTemplatesCode(..) => "Specific guild template",
Path::InteractionCallback(..) => "Interaction callback",
Path::InvitesCode => "Invite info",
Path::OauthApplicationsMe => "Current application info",
@@ -167,7 +170,6 @@ fn path_name(path: &Path) -> &'static str {
Path::UsersIdGuildsId => "Guild from user",
Path::UsersIdGuildsIdMember => "Member of a guild",
Path::VoiceRegions => "Voice region list",
- Path::WebhooksIdToken(..) => "Webhook",
Path::WebhooksIdTokenMessagesId(..) => "Specific webhook message",
_ => "Unknown path!",
}