This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using HanyadikHetVan.Data.Entities;
|
||||
using HanyadikHetVan.DTO;
|
||||
using HanyadikHetVan.Services;
|
||||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
@@ -46,7 +47,7 @@ namespace HanyadikHetVan.Controllers.V2
|
||||
}
|
||||
}
|
||||
[HttpDelete("{weeklyTimeSpanId}")]
|
||||
[Authorize(Roles = "admin")]
|
||||
[Authorize(Policy = "AdminPolicy", AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
|
||||
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(bool))]
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
@@ -63,7 +64,7 @@ namespace HanyadikHetVan.Controllers.V2
|
||||
}
|
||||
}
|
||||
[HttpPut]
|
||||
[Authorize(Roles = "admin")]
|
||||
[Authorize(Policy = "AdminPolicy", AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
|
||||
[Consumes(MediaTypeNames.Application.Json)]
|
||||
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(WeeklyTimeSpanDTO))]
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
|
||||
Reference in New Issue
Block a user