Exemplo n.º 1
0
        public async Task <ActionResult <StoreResponse> > UpdateStoreForBrand(int id, [FromBody] PutStoresForBrandRequest model)
        {
            Guid accountId = new Guid(User.FindFirst(ClaimTypes.NameIdentifier)?.Value);
            int  brandId   = (bool)(!User.FindFirst("BrandId")?.Value.Equals("")) ? Convert.ToInt32(User.FindFirst("BrandId")?.Value) : 0;
            var  rs        = await _storesService.PutStoreForBrand(id, accountId, brandId, model);

            if (rs == null)
            {
                return(NotFound());
            }
            return(Ok(rs));
        }