mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-11-03 19:17:16 -05:00 
			
		
		
		
	Fixing int requirement
This commit is contained in:
		
							parent
							
								
									3e7ddff99e
								
							
						
					
					
						commit
						00ed7a4863
					
				@ -26,7 +26,7 @@ namespace Kyoo.CommonApi
 | 
			
		||||
			_baseURL = configuration.GetValue<string>("public_url").TrimEnd('/');
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
		[HttpGet("{id}")]
 | 
			
		||||
		[HttpGet("{id:int}")]
 | 
			
		||||
		[Authorize(Policy = "Read")]
 | 
			
		||||
		[JsonDetailed]
 | 
			
		||||
		public async Task<ActionResult<T>> Get(int id)
 | 
			
		||||
@ -113,7 +113,7 @@ namespace Kyoo.CommonApi
 | 
			
		||||
			return await _repository.Edit(ressource, resetOld);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		[HttpPut("{id}")]
 | 
			
		||||
		[HttpPut("{id:int}")]
 | 
			
		||||
		[Authorize(Policy = "Write")]
 | 
			
		||||
		public async Task<ActionResult<T>> Edit(int id, [FromQuery] bool resetOld, [FromBody] T ressource)
 | 
			
		||||
		{
 | 
			
		||||
@ -139,7 +139,7 @@ namespace Kyoo.CommonApi
 | 
			
		||||
			return await _repository.Edit(ressource, resetOld);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		[HttpDelete("{id}")]
 | 
			
		||||
		[HttpDelete("{id:int}")]
 | 
			
		||||
		[Authorize(Policy = "Write")]
 | 
			
		||||
		public async Task<IActionResult> Delete(int id)
 | 
			
		||||
		{
 | 
			
		||||
 | 
			
		||||
@ -24,14 +24,14 @@ namespace Kyoo.Api
 | 
			
		||||
			_libraryManager = libraryManager;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		[HttpGet("{showID}/season")]
 | 
			
		||||
		[HttpGet("{showID}/seasons")]
 | 
			
		||||
		[HttpGet("{showID:int}/season")]
 | 
			
		||||
		[HttpGet("{showID:int}/seasons")]
 | 
			
		||||
		[Authorize(Policy = "Read")]
 | 
			
		||||
		public async Task<ActionResult<Page<Season>>> GetSeasons(int showID,
 | 
			
		||||
			[FromQuery] string sortBy,
 | 
			
		||||
			[FromQuery] int limit,
 | 
			
		||||
			[FromQuery] int afterID,
 | 
			
		||||
			[FromQuery] Dictionary<string, string> where)
 | 
			
		||||
			[FromQuery] Dictionary<string, string> where,
 | 
			
		||||
			[FromQuery] int limit = 20)
 | 
			
		||||
		{
 | 
			
		||||
			where.Remove("showID");
 | 
			
		||||
			where.Remove("sortBy");
 | 
			
		||||
@ -58,9 +58,9 @@ namespace Kyoo.Api
 | 
			
		||||
		[Authorize(Policy = "Read")]
 | 
			
		||||
		public async Task<ActionResult<Page<Season>>> GetSeasons(string slug,
 | 
			
		||||
			[FromQuery] string sortBy,
 | 
			
		||||
			[FromQuery] int limit,
 | 
			
		||||
			[FromQuery] int afterID,
 | 
			
		||||
			[FromQuery] Dictionary<string, string> where)
 | 
			
		||||
			[FromQuery] Dictionary<string, string> where,
 | 
			
		||||
			[FromQuery] int limit = 20)
 | 
			
		||||
		{
 | 
			
		||||
			where.Remove("slug");
 | 
			
		||||
			where.Remove("sortBy");
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user