add support got path

This commit is contained in:
DjDeveloperr 2021-04-25 16:27:34 +05:30
parent 3fe3a84928
commit 332f0f2742
1 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,7 @@ export interface DeploySlashInitOptions {
env?: boolean
publicKey?: string
token?: string
path?: string
}
/** Current Slash Client being used to handle commands */
@ -64,6 +65,9 @@ export function init(options: DeploySlashInitOptions): void {
respondWith: CallableFunction
request: Request
}): Promise<void> => {
if (options.path !== undefined) {
if (new URL(evt.request.url).pathname !== options.path) return
}
try {
// we have to wrap because there are some weird scope errors
const d = await client.verifyFetchEvent({