public HttpStatusCode CreateCatalog(CreateCatalogDto catalog) { string userId = User.FindFirst(ClaimTypes.NameIdentifier).Value; if (string.IsNullOrEmpty(userId)) { return(HttpStatusCode.Unauthorized); } var response = _catalogRepository.CreateCatalog(catalog, userId); switch (response) { case HttpStatusCode.OK: return(HttpStatusCode.OK); case HttpStatusCode.InternalServerError: return(HttpStatusCode.InternalServerError); default: return(HttpStatusCode.NotFound); } }