From db67a5015d6acee64f20688a9873798f53067bc2 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 24 Jun 2019 17:47:43 +0000 Subject: [PATCH] --- devdocs/todo.txt | 4 +--- server/AyaNova/Controllers/TagListController.cs | 2 +- server/AyaNova/biz/TagUtil.cs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 357e992d..b400b599 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -15,9 +15,7 @@ REALLY MAKING MORE PROGRESS WHEN CLIENT DEV DRIVES BACKEND DEV, STICK TO THAT!! DO CLIENT STUFF NOW COME BACK TO THIS STUFF LATER -TODO: Tag list search route needs a hard limit, right now it could return infinite results, should be hard capped at a sane level, particularly in event of single letter searches - - Maybe no more than 100 results at a time or whatever is practical at the client end - - Make sure it limits by sql query, not by post processing results otherwise it's only solving half the problem + ###*** BEFORE NEXT UPDATE TO DEVOPS SERVER::::::: TODO: 2019-06-07 10:47:57.8894|WARN|Microsoft.AspNetCore.Cors.Infrastructure.CorsService|The CORS protocol does not allow specifying a wildcard (any) origin and credentials at the same time. Configure the policy by listing individual origins if credentials needs to be supported. 2 diff --git a/server/AyaNova/Controllers/TagListController.cs b/server/AyaNova/Controllers/TagListController.cs index 60e069b0..07255035 100644 --- a/server/AyaNova/Controllers/TagListController.cs +++ b/server/AyaNova/Controllers/TagListController.cs @@ -46,7 +46,7 @@ namespace AyaNova.Api.Controllers /// Required roles: Any /// /// The query to filter the returned list by - /// List + /// Filtered list (maximum 25 items are returned for any query) [HttpGet("picklist")] public ActionResult GetPickList([FromQuery]string query) { diff --git a/server/AyaNova/biz/TagUtil.cs b/server/AyaNova/biz/TagUtil.cs index dd334352..0ca6e165 100644 --- a/server/AyaNova/biz/TagUtil.cs +++ b/server/AyaNova/biz/TagUtil.cs @@ -167,7 +167,7 @@ namespace AyaNova.Biz else { q = NormalizeTag(q); - return ct.Tag.Where(x => x.Name.Contains(q)).OrderBy(x => x.Name).Select(x => x.Name).Take(3).ToList(); + return ct.Tag.Where(x => x.Name.Contains(q)).OrderBy(x => x.Name).Select(x => x.Name).Take(25).ToList(); } }