Example #1
0
        public async Task <IActionResult> Delete(string id)
        {
            var space = await _spaceService.Get(id);

            if (space == null)
            {
                return(NotFound());
            }
            try
            {
                await _spaceService.Remove(space.Id);
            }
            catch (Exception ex)
            {
                return(StatusCode(500, "Internal server error"));
            }
            return(Ok());
        }