public ActionResult <Album> GetAlbum(Guid id) { var album = _albumService.Buscar(id); if (album == null) { return(NotFound()); } return(album); }
public IActionResult Editar(Guid id) { try { if (!_session.Get <Cliente>("cliente").Login.Administrador) { return(RedirectToAction("VoltarAoSite")); } } catch { return(RedirectToAction("VoltarAoSite")); } return(View(_albumService.Buscar(id))); }
public IActionResult Editar(Guid id) { try { if (_session.Get <Cliente>("cliente").Email != "*****@*****.**") { return(RedirectToAction("VoltarAoSite")); } } catch { return(RedirectToAction("VoltarAoSite")); } return(View(_albumService.Buscar(id))); }
public ActionResult <Foto> GetFotoDoAlbum(Guid id) { var album = _albumService.Buscar(id); if (album == null) { return(NotFound()); } return(Ok(JsonConvert.SerializeObject(_fotoService.BuscarTodosDoAlbum(album)))); }