| 
									
										
										
										
											2022-08-03 00:28:29 +03:00
										 |  |  | using System.Collections.Generic; | 
					
						
							|  |  |  | using Microsoft.AspNetCore.Mvc; | 
					
						
							| 
									
										
										
										
											2022-11-09 05:17:39 +01:00
										 |  |  | using Server.Models.Database; | 
					
						
							| 
									
										
										
										
											2022-08-03 00:28:29 +03:00
										 |  |  | using Server.Services.Interfaces; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace Server.Controllers.V2; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ApiController] | 
					
						
							|  |  |  | [ApiExplorerSettings(GroupName = "v2")] | 
					
						
							|  |  |  | [Route("/v2/[controller]")]
 | 
					
						
							|  |  |  | public class StationsController : Controller { | 
					
						
							|  |  |  | 	private IDatabase Database { get; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	public StationsController(IDatabase database) { | 
					
						
							|  |  |  | 		this.Database = database; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	[HttpGet("")] | 
					
						
							| 
									
										
										
										
											2022-11-09 05:17:39 +01:00
										 |  |  | 	public ActionResult<IEnumerable<StationListing>> ListStations() { | 
					
						
							| 
									
										
										
										
											2022-08-03 00:28:29 +03:00
										 |  |  | 		return Ok(Database.Stations); | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } |