Skip to content

Commit 6111363

Browse files
committed
fix adding rstrinction authrize for getting all news
1 parent 2e44ef7 commit 6111363

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

Streetcode/Streetcode.BLL/MediatR/Newss/GetAll/GetAllNewsHandler.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using System.Linq.Expressions;
2-
using AutoMapper;
1+
using AutoMapper;
32
using FluentResults;
43
using MediatR;
54
using Microsoft.AspNetCore.Http;

Streetcode/Streetcode.WebApi/Controllers/Newss/NewsController.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ namespace Streetcode.WebApi.Controllers.Newss
1515
public class NewsController : BaseApiController
1616
{
1717
[HttpGet]
18-
[Authorize(Roles = nameof(UserRole.Admin))]
19-
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
2018
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(IEnumerable<NewsDTO>))]
2119
public async Task<IActionResult> GetAll([FromQuery] ushort page = 1, [FromQuery] ushort pageSize = 10)
2220
{

0 commit comments

Comments
 (0)