public async Task <IActionResult> AddMarket(long id, [FromBody] AddMarketSellerDTO addedMarketSeller) { // check if requester is trying to add a market to another seller if (id != addedMarketSeller.SellerId) { return(Forbid()); } // check if requester is part of the seller if (!await _permissionService.UserIsSeller(HttpContext.GetUserIdFromToken(), id)) { return(Forbid()); } return(Ok(await _sellerService.AddMarketToSeller(addedMarketSeller))); }