Exemplo n.º 1
0
        public async Task <ActionResult <StoreDetailResponse> > GetStoreById(int id)
        {
            try
            {
                Guid accountId = new Guid(User.FindFirst(ClaimTypes.NameIdentifier)?.Value);
                int  role      = Convert.ToInt32(User.FindFirst(ClaimTypes.Role)?.Value);
                var  rs        = await _storesService.GetStoreById(id, accountId, role);

                return(Ok(rs));
            }
            catch (Exception e)
            {
                throw new CrudException(HttpStatusCode.BadRequest, "Get Store Error!!!", e.InnerException?.Message);
            }
        }