Skip to content

Commit c07665a

Browse files
Renamed from EditProduct to UpdateProduct, also its HTTP Route, etc.
1 parent 313976d commit c07665a

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ public async Task<IActionResult> CatalogBrands()
136136
return Ok(items);
137137
}
138138

139-
//POST api/v1/[controller]/edit
140-
[Route("edit")]
139+
//POST api/v1/[controller]/update
140+
[Route("update")]
141141
[HttpPost]
142-
public async Task<IActionResult> EditProduct([FromBody]CatalogItem productToUpdate)
142+
public async Task<IActionResult> UpdateProduct([FromBody]CatalogItem productToUpdate)
143143
{
144144
var catalogItem = await _catalogContext.CatalogItems.SingleOrDefaultAsync(i => i.Id == productToUpdate.Id);
145145
if (catalogItem == null) return NotFound();

test/Services/FunctionalTests/Services/Catalog/CatalogScenariosBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public static string ProductByName(string name)
3434

3535
public static class Post
3636
{
37-
public static string UpdateCatalogProduct = "api/v1/catalog/edit";
37+
public static string UpdateCatalogProduct = "api/v1/catalog/update";
3838
}
3939
}
4040
}

0 commit comments

Comments
 (0)