|  |  |  | @ -5,6 +5,7 @@ import * as xml2js from "xml2js"; | 
		
	
		
			
				|  |  |  |  | const app = new Koa(); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | app.use(async (ctx) => { | 
		
	
		
			
				|  |  |  |  | 	try { | 
		
	
		
			
				|  |  |  |  | 		const { data } = await Axios.get( | 
		
	
		
			
				|  |  |  |  | 			"https://podcast.midline.pl/api/v1/channels/Midline/rss" | 
		
	
		
			
				|  |  |  |  | 		); | 
		
	
	
		
			
				
					|  |  |  | @ -15,6 +16,11 @@ app.use(async (ctx) => { | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | 		ctx.body = builder.buildObject(parsed_data); | 
		
	
		
			
				|  |  |  |  | 		ctx.type = "application/rss+xml"; | 
		
	
		
			
				|  |  |  |  | 	} catch (e) { | 
		
	
		
			
				|  |  |  |  | 		console.error(e); | 
		
	
		
			
				|  |  |  |  | 		ctx.body = "error"; | 
		
	
		
			
				|  |  |  |  | 		ctx.status = 500; | 
		
	
		
			
				|  |  |  |  | 	} | 
		
	
		
			
				|  |  |  |  | }); | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | app.listen(3000); | 
		
	
	
		
			
				
					|  |  |  | 
 |