mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	hashtags!
This commit is contained in:
		
							parent
							
								
									366136d2f0
								
							
						
					
					
						commit
						f9a0b62176
					
				
							
								
								
									
										18
									
								
								server.js
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								server.js
									
									
									
									
									
								
							| @ -592,6 +592,16 @@ app.get("/api/subtitles", async (req, res) => { | ||||
|   res.send(body); | ||||
| }); | ||||
| 
 | ||||
| app.get("/api/redirect", async (req, res) => { | ||||
|   const red_url = req.query.u; | ||||
| 
 | ||||
|   if (!red_url) { | ||||
|     res.redirect("/"); | ||||
|   } | ||||
| 
 | ||||
|   res.redirect(red_url); | ||||
| }); | ||||
| 
 | ||||
| app.get("/api/opensearch", async (req, res) => { | ||||
|   res.sendFile(__dirname + `/opensearch.xml`); | ||||
| }); | ||||
| @ -606,6 +616,14 @@ app.get("/discover", async function (req, res) { | ||||
|   res.redirect("/"); | ||||
| }); | ||||
| 
 | ||||
| app.get("/hashtag/:id", (req, res) => { | ||||
|   if (!req.params.id) { | ||||
|     return res.redirect("/"); | ||||
|   } | ||||
| 
 | ||||
|   return res.redirect(`/search?query=${req.params.id}&from=hashtag`); | ||||
| }); | ||||
| 
 | ||||
| app.get("/video/upload", (req, res) => { | ||||
|   res.redirect("https://youtube.com/upload"); | ||||
| }); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ashley
						Ashley