feat(handlers/webhook): test slash command name against ^[\w-]{1,32}$ (#613)

* feat(handlers/webhook): test slash command name against ^[\w-]{1,32}$

* Update src/api/handlers/webhook.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/api/handlers/webhook.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/api/handlers/webhook.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* Update src/api/handlers/webhook.ts

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>

* move to constants file

* idk

* idk

Co-authored-by: ITOH <72305210+itohatweb@users.noreply.github.com>
This commit is contained in:
ayntee
2021-03-07 18:48:12 +04:00
committed by GitHub
parent 9c7340f624
commit 4af6f363f8
2 changed files with 7 additions and 9 deletions
+2
View File
@@ -175,3 +175,5 @@ export const endpoints = {
// oAuth2
OAUTH2_APPLICATION: `${baseEndpoints.BASE_URL}/oauth2/applications/@me`,
};
export const SLASH_COMMANDS_NAME_REGEX = /^[\w-]{1,32}$/;