add support got path
This commit is contained in:
		
							parent
							
								
									3fe3a84928
								
							
						
					
					
						commit
						332f0f2742
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -14,6 +14,7 @@ export interface DeploySlashInitOptions { | ||||||
|   env?: boolean |   env?: boolean | ||||||
|   publicKey?: string |   publicKey?: string | ||||||
|   token?: string |   token?: string | ||||||
|  |   path?: string | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /** Current Slash Client being used to handle commands */ | /** Current Slash Client being used to handle commands */ | ||||||
|  | @ -64,6 +65,9 @@ export function init(options: DeploySlashInitOptions): void { | ||||||
|     respondWith: CallableFunction |     respondWith: CallableFunction | ||||||
|     request: Request |     request: Request | ||||||
|   }): Promise<void> => { |   }): Promise<void> => { | ||||||
|  |     if (options.path !== undefined) { | ||||||
|  |       if (new URL(evt.request.url).pathname !== options.path) return | ||||||
|  |     } | ||||||
|     try { |     try { | ||||||
|       // we have to wrap because there are some weird scope errors
 |       // we have to wrap because there are some weird scope errors
 | ||||||
|       const d = await client.verifyFetchEvent({ |       const d = await client.verifyFetchEvent({ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue