mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
fix: share same bucket for all interactions callback
This commit is contained in:
parent
a8380bf07d
commit
6675757b61
@ -383,6 +383,10 @@ export class ApiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
routefy(url: string, method: HttpMethods): `/${string}` {
|
routefy(url: string, method: HttpMethods): `/${string}` {
|
||||||
|
if (url.startsWith('/interactions/') && url.endsWith('/callback')) {
|
||||||
|
return '/interactions/:id/:token/callback';
|
||||||
|
}
|
||||||
|
|
||||||
let route = url
|
let route = url
|
||||||
.replace(/\/([a-z-]+)\/(?:[0-9]{17,19})/g, (match, p) =>
|
.replace(/\/([a-z-]+)\/(?:[0-9]{17,19})/g, (match, p) =>
|
||||||
p === 'channels' || p === 'guilds' || p === 'webhooks' ? match : `/${p}/:id`,
|
p === 'channels' || p === 'guilds' || p === 'webhooks' ? match : `/${p}/:id`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user