44 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
| using System;
 | |
| using System.Collections.Generic;
 | |
| using System.Net;
 | |
| using System.Web.Http;
 | |
| using Kreta.Ellenorzo.BL.VN.Faliujsag;
 | |
| using Kreta.Ellenorzo.Dto.VN.Exception;
 | |
| using Kreta.Ellenorzo.Dto.VN.Faliujsag;
 | |
| using Kreta.Ellenorzo.Enums;
 | |
| using Kreta.Ellenorzo.Web.FilterAttributes;
 | |
| using Kreta.Ellenorzo.WebApi.FilterAttributes;
 | |
| using Kreta.Ellenorzo.WebApi.VN.Documentation;
 | |
| using Kreta.Ellenorzo.WebApi.VN.Logic;
 | |
| using Swashbuckle.Examples;
 | |
| using Swashbuckle.Swagger.Annotations;
 | |
| using static Kreta.Ellenorzo.Dto.VN.Converter.ResponseModelConverter;
 | |
| 
 | |
| namespace Kreta.Ellenorzo.WebApi.VN.Controllers
 | |
| {
 | |
|     [ApiKeyAuthorization]
 | |
|     [IdpAuthorize(FelhasznaloSzerepkor.Tanulo, FelhasznaloSzerepkor.Gondviselo)]
 | |
|     [RoutePrefix(Constants.RoutePrefix + "/Sajat")]
 | |
|     [SwaggerResponse(HttpStatusCode.OK, DescriptionLookUp.FaliujsagResponseLeiras + DescriptionOneNote.Faliujsag, typeof(FaliujsagListResponseDto))]
 | |
|     [SwaggerResponseExample(HttpStatusCode.OK, typeof(DummyListExampleProvider<FaliujsagController, FaliujsagListResponseDto>))]
 | |
|     [SwaggerResponse(HttpStatusCode.Unauthorized, DescriptionLookUp.JogosulatlanTokenLejartResponseLeiras, typeof(string))]
 | |
|     [SwaggerResponseExample(HttpStatusCode.Unauthorized, typeof(LejartTokenExample))]
 | |
|     [SwaggerResponse(HttpStatusCode.Forbidden, DescriptionLookUp.HozzaferesMegtagadvaResponseLeiras, typeof(string))]
 | |
|     [SwaggerResponseExample(HttpStatusCode.Forbidden, typeof(PermissionDeniedExample))]
 | |
|     [SwaggerResponse(HttpStatusCode.InternalServerError, DescriptionLookUp.IsmeretlenHibaTortentResponseLeiras, typeof(EllenorzoExceptionResponseDto))]
 | |
|     [SwaggerResponseExample(HttpStatusCode.InternalServerError, typeof(IsmeretlenHibaExample))]
 | |
|     [SwaggerResponse(HttpStatusCode.Conflict, DescriptionLookUp.TanevetValtottAzIntezmeny, typeof(EllenorzoExceptionResponseDto))]
 | |
|     [SwaggerResponseExample(HttpStatusCode.Conflict, typeof(IntezmenyMarTanevetValtottExample))]
 | |
|     public class FaliujsagController : ApiController
 | |
|     {
 | |
|         /// <summary>
 | |
|         /// Tanuló számára megjelenő admin és tanár által rögzített faliújság elemek 
 | |
|         /// </summary>
 | |
|         [HttpGet, Route("FaliujsagElemek")]
 | |
|         public HashSet<FaliujsagListResponseDto> ListFaliujsag([FromUri] FaliujsagListRequestDto request)
 | |
|         {
 | |
|             return ModelToDto(((FaliujsagFacade)Activator.CreateInstance(typeof(FaliujsagFacade), FelhasznaloLogic.GetFelhasznalo())).ListFaliujsag(request));
 | |
|         }
 | |
|     }
 | |
| }
 |