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