public async Task <AnnouncementEnvelope> ListAsync(Guid travelPlanId, int limit, int offset) { try { var tPlan = await _travelPlanService.GetAsync(travelPlanId); if (tPlan == null) { throw new CommonException("Invalid TravelPlan"); } var annEnvelope = await _announcementRepository.ListAsync(travelPlanId, limit, offset); return(annEnvelope); } catch (Exception) { throw; } }
public async Task <IActionResult> List([FromQuery] Guid travelPlanId) { var announcements = await _announcementRepo.ListAsync(travelPlanId); return(Ok(announcements)); }