public async Task <IActionResult> CreateFlowerBouquet(FlowerBouquetUpsertInput input) { _logger.LogInformation("Creating a flowerbouquet", input); try{ var persistedBouquet = await _bouquets.Insert(input.bouquetName, input.price, input.amountSold, input.description); return(Created($"/bouquets/{persistedBouquet.id}", persistedBouquet.Convert())); } catch (NotFoundException) { return(NotFound()); } }
public async Task <IActionResult> UpdateFlowerBouquet(int id, FlowerBouquetUpsertInput input) { _logger.LogInformation("Updating a flowerbouquet", input); try { await _bouquets.Update(id, input.bouquetName, input.price, input.amountSold, input.description); return(Accepted()); } catch (NotFoundException) { return(NotFound()); } }