From cd1f98f575dfa95e229d7602e460505ad182d401 Mon Sep 17 00:00:00 2001 From: shept Date: Sun, 27 Apr 2025 15:40:57 +0500 Subject: [PATCH] add test docs for swagger --- .../Controllers/AuthController.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SurveyBackend/SurveyBackend.API/Controllers/AuthController.cs b/SurveyBackend/SurveyBackend.API/Controllers/AuthController.cs index 6e5148a..f840248 100644 --- a/SurveyBackend/SurveyBackend.API/Controllers/AuthController.cs +++ b/SurveyBackend/SurveyBackend.API/Controllers/AuthController.cs @@ -17,6 +17,14 @@ public class AuthController : ControllerBase _authorizationService = authorizationService; } + /// + /// Авторизация + /// + /// Принимает на вход email и password. При отсутствии такого email вернет 404, при неправильном пароле 401, при успехе 200 и валидный токен + /// + /// Success: Возвращает токен + /// Unauthorized: Неправильный пароль + /// [AllowAnonymous] [HttpPost("login")] [ProducesResponseType(StatusCodes.Status401Unauthorized)] @@ -27,6 +35,12 @@ public class AuthController : ControllerBase return Ok(new { token = token }); } + /// + /// Регистрация + /// + /// Принимает на вход кучу всяких полей, потом разберемся + /// + /// [AllowAnonymous] [HttpPost("register")] [ProducesResponseType(StatusCodes.Status401Unauthorized)]