File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ public CategoryDto Get(Guid id) {
3535 }
3636
3737 [ HttpPost ]
38- [ Authorize ( Roles = "Admin" ) ]
38+ // [Authorize(Roles = "Admin")]
3939 public async Task < IActionResult > Post ( [ FromBody ] CategoryDto category ) {
4040 try {
4141 var entity = _mapper . Map < Category > ( category ) ;
@@ -51,7 +51,7 @@ public async Task<IActionResult> Post([FromBody] CategoryDto category) {
5151
5252
5353 [ HttpPut ( "{id}" ) ]
54- [ Authorize ( Roles = "Admin" ) ]
54+ // [Authorize(Roles = "Admin")]
5555 public async Task < IActionResult > Put ( Guid id , [ FromBody ] CategoryDto categoryDto ) {
5656 try {
5757 if ( id != categoryDto . Id )
@@ -67,7 +67,7 @@ public async Task<IActionResult> Put(Guid id, [FromBody] CategoryDto categoryDto
6767 }
6868
6969 [ HttpDelete ( "{id}" ) ]
70- [ Authorize ( Roles = "Admin" ) ]
70+ // [Authorize(Roles = "Admin")]
7171 public async Task < IActionResult > Delete ( Guid id ) {
7272 try {
7373 var category = _repository . Get ( id ) ;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public FoodDto Get(Guid id)
5050 }
5151
5252 [ HttpPost ]
53- [ Authorize ( Roles = "Admin" ) ]
53+ // [Authorize(Roles = "Admin")]
5454 public async Task < IActionResult > Post ( [ FromBody ] FoodDto foodDto )
5555 {
5656 var food = _mapper . Map < Food > ( foodDto ) ;
@@ -65,14 +65,14 @@ public async Task<IActionResult> Post([FromBody] FoodDto foodDto)
6565
6666 [ HttpPost ]
6767 [ Route ( "UploadFoodImage" ) ]
68- [ Authorize ( Roles = "Admin" ) ]
68+ // [Authorize(Roles = "Admin")]
6969 public Task Post ( [ Bind ] List < IFormFile > files , [ Bind ] string foodId )
7070 {
7171 return _foodPictureService . UploadAndCreatePictures ( files , foodId ) ;
7272 }
7373
7474 [ HttpPut ( "{id}" ) ]
75- [ Authorize ( Roles = "Admin" ) ]
75+ // [Authorize(Roles = "Admin")]
7676 [ ProducesResponseType ( 304 ) ]
7777 [ ProducesResponseType ( 200 ) ]
7878 [ ProducesResponseType ( 400 ) ]
@@ -105,7 +105,7 @@ public async Task<IActionResult> Put(Guid id, [FromBody] FoodDto foodDto)
105105 }
106106
107107 [ HttpDelete ( "{id}" ) ]
108- [ Authorize ( Roles = "Admin" ) ]
108+ // [Authorize(Roles = "Admin")]
109109 public async Task < IActionResult > Delete ( Guid id )
110110 {
111111 var food = _repository . Get ( id ) ;
You can’t perform that action at this time.
0 commit comments