Skip to content

Commit

Permalink
revert code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronaldo Macapobre committed Jul 23, 2024
1 parent ae05ff8 commit 0dd5377
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions api/Controllers/LocationController.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
Expand Down Expand Up @@ -32,8 +31,6 @@ public async Task<ActionResult<List<Location>>> GetLocationsAndCourtRooms()
{
var locations = await _locationService.GetLocations();

Console.WriteLine("123");

var locationList = locations.Select(location => new Location
{
Name = location.LongDesc,
Expand All @@ -47,10 +44,10 @@ public async Task<ActionResult<List<Location>>> GetLocationsAndCourtRooms()
foreach (var location in locationList)
{
location.CourtRooms = courtRooms.Where(cr => cr.Flex == location.LocationId && (cr.ShortDesc == "CRT" || cr.ShortDesc == "HGR"))
.Select(cr => new CourtRoom { LocationId = cr.Flex, Room = cr.Code, Type = cr.ShortDesc }).ToList();
.Select(cr => new CourtRoom {LocationId = cr.Flex, Room = cr.Code, Type = cr.ShortDesc}).ToList();
}

return Ok(locationList);
}
}
}
}

0 comments on commit 0dd5377

Please sign in to comment.