mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	add regex lol
This commit is contained in:
		
							parent
							
								
									4e9411f0d7
								
							
						
					
					
						commit
						abd5b68a28
					
				| @ -77,12 +77,14 @@ module.exports = function (app, config, renderTemplate) { | ||||
|     }; | ||||
| 
 | ||||
|     if (req.params.v) { | ||||
|       const isvld = await core.isvalidvideo(req.params.v); | ||||
|       if (/[a-zA-Z0-9]+/.test(req.param.v)) { | ||||
|         const isvld = await core.isvalidvideo(req.params.v); | ||||
| 
 | ||||
|       if (isvld) { | ||||
|         return res.redirect(`/watch?v=${req.params.v}`); | ||||
|       } else { | ||||
|         return rendermainpage(); | ||||
|         if (isvld) { | ||||
|           return res.redirect(`/watch?v=${req.params.v}`); | ||||
|         } else { | ||||
|           return rendermainpage(); | ||||
|         } | ||||
|       } | ||||
|     } else { | ||||
|       return rendermainpage(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ashley
						Ashley