public async Task<IHttpActionResult> ListPagesByDay(DateTime day, string token = null) { var persistence = new PagePersistence(); var pages = await persistence.ListByDay(day, token); return Ok(pages); }
public async Task<IHttpActionResult> GetOnlyOnePage(DateTime day, Uri url) { var persistence = new PagePersistence(); var page = await persistence.Get(day, url); return Ok(page); }
public async Task<IHttpActionResult> SaveASinglePage(Page page) { var persistence = new PagePersistence(); page.Day = DateTime.Today; await persistence.Save(page); return Ok(page); }
public async Task<IHttpActionResult> SaveAMultiplePage(Page[] pages) { var persistence = new PagePersistence(); foreach (var page in pages) { page.Day = DateTime.Today; } await persistence.Save(pages); return Ok(pages); }