コード例 #1
0
        public async Task <ActionResult <StoreResponse> > DeleteStore(int id)
        {
            int  role      = Convert.ToInt32(User.FindFirst(ClaimTypes.Role)?.Value);
            int  brandId   = (bool)(!User.FindFirst("BrandId")?.Value.Equals("")) ? Convert.ToInt32(User.FindFirst("BrandId")?.Value) : 0;
            Guid accountId = new Guid(User.FindFirst(ClaimTypes.NameIdentifier)?.Value);
            var  rs        = await _storesService.DeleteStore(id, accountId, role, brandId);

            if (rs.Id == 0)
            {
                return(NotFound());
            }
            return(Ok(rs));
        }