public IActionResult Geofence(int departmentGroupId) { var model = new GeofenceView(); model.Group = _departmentGroupsService.GetGroupById(departmentGroupId); if (model.Group.DepartmentId != DepartmentId) { Unauthorized(); } model.Coordinates = _departmentGroupsService.GetMapCenterCoordinatesForGroup(departmentGroupId); return(View(model)); }
public async Task <IActionResult> Geofence(int departmentGroupId) { var model = new GeofenceView(); model.Group = await _departmentGroupsService.GetGroupByIdAsync(departmentGroupId); if (model.Group.DepartmentId != DepartmentId) { Unauthorized(); } model.Coordinates = await _departmentGroupsService.GetMapCenterCoordinatesForGroupAsync(departmentGroupId); return(View(model)); }