public async Task <IHttpActionResult> AccountProductPut(Guid accountId, AddOwnerProductViewModel model) { return(await CurrentAccountExecuteAsync(async delegate(Account account) { await _authProduct.OwnerProductInsertAsync(accountId, model.ProductUid, model.Currency, model.Price, model.PriceUsd, model.Quantity); var log = string.Format("Product({0}) has been added successfully. Customer's email is {1}.", model.ProductUid, account.Email); await LogInsertAsync(log, LogActionTypeEnum.AccountProductAdd, account.Id); return Ok(); }, accountId)); }
public async Task <IHttpActionResult> OwnerProductInsert(AddOwnerProductViewModel model) { await _authProduct.OwnerProductInsertAsync(model.UserId, model.ProductUid, model.Currency, model.Price, model.PriceUsd, model.Quantity); return(Ok()); }