MSP-1070 update swagger
This commit is contained in:
1 parent
e2df3f377d
commit
14d526e033
4 files changed
+196
-71
No files matched your search
@@ -21,6 +21,17 @@ func NewSecure(service SecureService) Secure {
|
||||
}
|
||||
}
|
||||
|
||||
// Authenticate
|
||||
// @Tags secure
|
||||
// @Summary Метод аутентификации токена
|
||||
// @Description Проверяет токен и возвращает идентификатор администратора
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param X-AUTH-ADMIN header string true "Токен администратора"
|
||||
// @Param body body domain.SecureAuthRequest true "Тело запроса"
|
||||
// @Success 200 {object} domain.SecureAuthResponse
|
||||
// @Failure 500 {object} domain.GrpcError
|
||||
// @Router /secure/authenticate [POST]
|
||||
func (s Secure) Authenticate(ctx context.Context, req domain.SecureAuthRequest) (*domain.SecureAuthResponse, error) {
|
||||
adminId, err := s.service.GetUserId(ctx, req.Token)
|
||||
switch {
|
||||
|
||||
Reference in new issue
Block a user