public ActionResult <string> Delete(int id) { try { return(Ok(_ps.Delete(id))); } catch (Exception e) { return(BadRequest(e.Message)); } }
public ActionResult <string> Delete(int id) { try { var creatorId = HttpContext.User.FindFirst(ClaimTypes.NameIdentifier).Value; return(Ok(_ps.Delete(creatorId, id))); } catch (Exception e) { return(BadRequest(e.Message)); } }