public IActionResult Delete(int id) { var context = HttpContext.User.Identity; var userId = int.Parse(context.Name); _spaceService.Delete(userId, id); return(Ok()); }
public async Task <IHttpActionResult> DeleteSpace(int id) { var result = await _spaceService?.GetAsync(id); if (result == null) { return(NotFound()); } await _spaceService?.Delete(id); return(Ok()); }