Projekt

Obecné

Profil

« Předchozí | Další » 

Revize a9acdf32

Přidáno uživatelem Vojtěch Bartička před asi 2 roky(ů)

Moved InternalServerError to ControllerBase

Zobrazit rozdíly:

Backend/Backend/Controllers/Common/CommonControllerBase.cs
1 1
using Microsoft.AspNetCore.Mvc;
2 2
using RestAPI.Authentication;
3
using System.Net;
3 4

  
4 5
namespace RestAPI.Controllers.Common;
5 6

  
6 7
[ApiController]
7 8
[Authorize]
9
[ProducesResponseType((int)HttpStatusCode.InternalServerError)]
8 10
public abstract class CommonControllerBase : ControllerBase
9 11
{
10 12
}
Backend/Backend/Controllers/DocumentController.cs
28 28
    [Authorize(Core.Enums.ERole.ADMINISTRATOR)]
29 29
    [ProducesResponseType((int)HttpStatusCode.OK)]
30 30
    [ProducesResponseType((int)HttpStatusCode.Forbidden)]
31
    [ProducesResponseType((int)HttpStatusCode.InternalServerError)]
32 31
    public ActionResult<DocumentListResponse> GetDocuments([FromServices] ClientInfo clientInfo, [FromBody] DocumentListRequest documentListRequest)
33 32
    {
34 33
        if (clientInfo.LoggedUser == null)
......
44 43
    [Authorize(Core.Enums.ERole.ADMINISTRATOR)]
45 44
    [ProducesResponseType((int)HttpStatusCode.OK)]
46 45
    [ProducesResponseType((int)HttpStatusCode.Forbidden)]
47
    [ProducesResponseType((int)HttpStatusCode.InternalServerError)]
48
    [ProducesResponseType((int)HttpStatusCode.UnsupportedMediaType)]
49 46
    public ActionResult PostDocuments([FromServices] ClientInfo clientInfo, [FromBody] DocumentAddRequest documentAddRequest)
50 47
    {
51 48
        if (clientInfo.LoggedUser == null)

Také k dispozici: Unified diff