MSP-7036 update pages sorting & search

This commit is contained in:
likhachevam committed 2026-02-13 17:06:52 +03:00
1 parent b1d5aae316
commit c17970678b
13 files changed
+288 -99

No files matched your search

+5 -5
View File
@@ -7,7 +7,7 @@ import (
)
type SessionService interface {
All(ctx context.Context, limit int, offset int) (*domain.SessionResponse, error)
All(ctx context.Context, req domain.SessionPageRequest) (*domain.SessionResponse, error)
Revoke(ctx context.Context, id int) error
}
@@ -27,13 +27,13 @@ func NewSession(service SessionService) Session {
// @Accept json
// @Produce json
// @Param X-AUTH-ADMIN header string true "Токен администратора"
// @Param body body domain.SessionRequest true "Тело запроса"
// @Success 200 {object} domain.PageRequest
// @Param body body domain.SessionPageRequest true "Тело запроса"
// @Success 200 {object} domain.SessionResponse
// @Failure 400 {object} domain.GrpcError "Невалидное тело запроса"
// @Failure 500 {object} domain.GrpcError
// @Router /session/all [POST]
func (c Session) All(ctx context.Context, req domain.PageRequest) (*domain.SessionResponse, error) {
return c.service.All(ctx, req.Limit, req.Offset)
func (c Session) All(ctx context.Context, req domain.SessionPageRequest) (*domain.SessionResponse, error) {
return c.service.All(ctx, req)
}
// Revoke