MSP-8974 review fixes

This commit is contained in:
chashintv committed 2026-11-23 13:00:03 +03:00
1 parent 1ea3ef186c
commit 7bac2e403f
20 files changed
+189 -466

No files matched your search

-1
View File
@@ -29,7 +29,6 @@ func NewAudit(service AuditService) Audit {
// All
// @Tags log
// @Summary Получение списка логов
// @Description `errorCode: 400` - если тело запроса невалидно
// @Accept json
// @Produce json
// @Param X-AUTH-ADMIN header string true "Токен администратора"
+9 -9
View File
@@ -10,9 +10,9 @@ import (
)
type DownloadService interface {
DownloadUsers(ctx context.Context, req domain.UsersDownloadRequest, w http.ResponseWriter) error
DownloadSessions(ctx context.Context, req domain.SessionDownloadRequest, w http.ResponseWriter) error
DownloadAudit(ctx context.Context, req domain.AuditDownloadRequest, w http.ResponseWriter) error
DownloadUsers(ctx context.Context, req domain.UsersPageRequest, w http.ResponseWriter) error
DownloadSessions(ctx context.Context, req domain.SessionPageRequest, w http.ResponseWriter) error
DownloadAudit(ctx context.Context, req domain.AuditPageRequest, w http.ResponseWriter) error
DownloadRoles(ctx context.Context, w http.ResponseWriter) error
}
@@ -31,11 +31,11 @@ func NewDownload(service DownloadService) Download {
// @Summary Скачать список пользователей в csv
// @Accept json
// @Produce json
// @Param body body domain.UsersDownloadRequest true "Тело запроса"
// @Param body body domain.UsersPageRequest true "Тело запроса"
// @Success 200
// @Failure 500 {object} apierrors.Error "Внутренняя ошибка сервиса ```{errorCode: -1}```"
// @Router /user/download [POST]
func (c Download) Users(ctx context.Context, req domain.UsersDownloadRequest, w http.ResponseWriter) error {
func (c Download) Users(ctx context.Context, req domain.UsersPageRequest, w http.ResponseWriter) error {
err := c.service.DownloadUsers(ctx, req, w)
if err != nil {
return errors.WithMessage(err, "download users")
@@ -49,11 +49,11 @@ func (c Download) Users(ctx context.Context, req domain.UsersDownloadRequest, w
// @Summary Скачать список сессий в csv
// @Accept json
// @Produce json
// @Param body body domain.SessionDownloadRequest true "Тело запроса"
// @Param body body domain.SessionPageRequest true "Тело запроса"
// @Success 200
// @Failure 500 {object} apierrors.Error "Внутренняя ошибка сервиса ```{errorCode: -1}```"
// @Router /session/download [POST]
func (c Download) Sessions(ctx context.Context, req domain.SessionDownloadRequest, w http.ResponseWriter) error {
func (c Download) Sessions(ctx context.Context, req domain.SessionPageRequest, w http.ResponseWriter) error {
err := c.service.DownloadSessions(ctx, req, w)
if err != nil {
return errors.WithMessage(err, "download sessions")
@@ -67,11 +67,11 @@ func (c Download) Sessions(ctx context.Context, req domain.SessionDownloadReques
// @Summary Скачать журнал аудита в csv
// @Accept json
// @Produce json
// @Param body body domain.AuditDownloadRequest true "Тело запроса"
// @Param body body domain.AuditPageRequest true "Тело запроса"
// @Success 200
// @Failure 500 {object} apierrors.Error "Внутренняя ошибка сервиса ```{errorCode: -1}```"
// @Router /log/download [POST]
func (c Download) Audit(ctx context.Context, req domain.AuditDownloadRequest, w http.ResponseWriter) error {
func (c Download) Audit(ctx context.Context, req domain.AuditPageRequest, w http.ResponseWriter) error {
err := c.service.DownloadAudit(ctx, req, w)
if err != nil {
return errors.WithMessage(err, "download audit")