mirror of
				https://github.com/zoriya/Kyoo.git
				synced 2025-10-31 10:37:13 -04:00 
			
		
		
		
	Cleaning up
This commit is contained in:
		
							parent
							
								
									6bdd363b7b
								
							
						
					
					
						commit
						aa63c9e8f2
					
				| @ -277,7 +277,7 @@ namespace Kyoo | ||||
| 					? null  | ||||
| 					: Convert.ChangeType(value, propertyType); | ||||
| 				ConstantExpression valueExpr = Expression.Constant(val, property.PropertyType); | ||||
| 				 | ||||
| 
 | ||||
| 				Expression condition = operand switch | ||||
| 				{ | ||||
| 					"eq" => Expression.Equal(propertyExpr, valueExpr), | ||||
| @ -286,8 +286,6 @@ namespace Kyoo | ||||
| 					"lte" => StringCompatibleExpression(Expression.LessThanOrEqual, propertyExpr, valueExpr), | ||||
| 					"gt" => StringCompatibleExpression(Expression.GreaterThan, propertyExpr, valueExpr), | ||||
| 					"gte" => StringCompatibleExpression(Expression.GreaterThanOrEqual, propertyExpr, valueExpr), | ||||
| 					// TODO Implement the Like expression | ||||
| 					"like" => throw new NotImplementedException("Like not implemented yet"), | ||||
| 					_ => throw new ArgumentException($"Invalid operand: {operand}")	 | ||||
| 				}; | ||||
| 
 | ||||
|  | ||||
| @ -92,7 +92,8 @@ namespace Kyoo.Controllers | ||||
| 					(ParameterExpression)((MemberExpression)sortKey.Body).Expression | ||||
| 				)); | ||||
| 			} | ||||
| 			query = query.Take(page.Count); | ||||
| 			if (page.Count > 0) | ||||
| 				query = query.Take(page.Count); | ||||
| 
 | ||||
| 			return await query.ToListAsync(); | ||||
| 		} | ||||
|  | ||||
| @ -48,7 +48,7 @@ namespace Kyoo | ||||
| 				options.UseLazyLoadingProxies() | ||||
| 					.UseNpgsql(_configuration.GetConnectionString("Database")); | ||||
| 				// .EnableSensitiveDataLogging() | ||||
| 				// .UseLoggerFactory(LoggerFactory.Create(builder => builder.AddConsole())); | ||||
| 				//.UseLoggerFactory(LoggerFactory.Create(builder => builder.AddConsole())); | ||||
| 			}, ServiceLifetime.Transient); | ||||
| 			 | ||||
| 			services.AddDbContext<IdentityDatabase>(options => | ||||
|  | ||||
| @ -48,7 +48,7 @@ namespace Kyoo.Api | ||||
| 			where.Remove("sortBy"); | ||||
| 			where.Remove("limit"); | ||||
| 			where.Remove("afterID"); | ||||
| 			if (limit <= 0) | ||||
| 			if (limit == 0) | ||||
| 				limit = 20; | ||||
| 
 | ||||
| 			ICollection<Show> shows; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user