File tree Expand file tree Collapse file tree
src/Bootstrapper/Controllers/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,25 +34,29 @@ public async Task<IActionResult> SearchAsync(ProductListFilter filter)
3434 }
3535
3636 [ HttpGet ( "dapper" ) ]
37+ [ MustHavePermission ( Permissions . Products . View ) ]
3738 public async Task < IActionResult > GetDapperAsync ( Guid id )
3839 {
3940 var products = await _service . GetByIdUsingDapperAsync ( id ) ;
4041 return Ok ( products ) ;
4142 }
4243
4344 [ HttpPost ]
45+ [ MustHavePermission ( Permissions . Products . Register ) ]
4446 public async Task < IActionResult > CreateAsync ( CreateProductRequest request )
4547 {
4648 return Ok ( await _service . CreateProductAsync ( request ) ) ;
4749 }
4850
4951 [ HttpPut ]
52+ [ MustHavePermission ( Permissions . Products . Update ) ]
5053 public async Task < IActionResult > UpdateAsync ( UpdateProductRequest request , Guid id )
5154 {
5255 return Ok ( await _service . UpdateProductAsync ( request , id ) ) ;
5356 }
5457
5558 [ HttpDelete ]
59+ [ MustHavePermission ( Permissions . Products . Remove ) ]
5660 public async Task < IActionResult > DeleteAsync ( Guid id )
5761 {
5862 var productId = await _service . DeleteProductAsync ( id ) ;
You can’t perform that action at this time.
0 commit comments