From 029bd6b8c680ddd6c01de3bc8d0ea305f1a8d64a Mon Sep 17 00:00:00 2001 From: Russ Tuck Date: Wed, 10 Jul 2024 12:45:56 -0400 Subject: [PATCH] Delete obsolete code and make 'buildings' same as 'building' --- .../Controllers/AdvancedSearchController.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Gordon360/Controllers/AdvancedSearchController.cs b/Gordon360/Controllers/AdvancedSearchController.cs index 9b85ddac7..513b527bc 100644 --- a/Gordon360/Controllers/AdvancedSearchController.cs +++ b/Gordon360/Controllers/AdvancedSearchController.cs @@ -125,28 +125,13 @@ public ActionResult> GetDepartments() /// All buildings [HttpGet] [Route("building")] + [Route("buildings")] public async Task>> GetBuildingsAsync([FromServices] webSQLContext webSQLContext) { var buildings = await webSQLContext.Procedures.account_list_buildingsAsync(); return Ok(buildings.Select(b => new BuildingViewModel(b.BLDG_CDE, b.BUILDING_DESC))); } - /// - /// Return a list of buildings. - /// - /// All buildings - [Obsolete("Use GetBuildingsAsync that gives structured building data")] - [HttpGet] - [Route("buildings")] - public ActionResult> GetBuildings() - { - var buildings = context.FacStaff.Select(fs => fs.BuildingDescription) - .Distinct() - .Where(d => d != null) - .OrderBy(d => d); - return Ok(buildings); - } - /// /// Return a list of involvements' descriptions. ///