MSP-8974 fix
This commit is contained in:
1 parent
ebc99c6ae4
commit
24a8ea2578
15 files changed
+362
-333
No files matched your search
+22
-20
@@ -22,16 +22,17 @@ func NewSession(service SessionService) Session {
|
||||
}
|
||||
|
||||
// All
|
||||
// @Tags session
|
||||
// @Summary Получение списка сессий
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param X-AUTH-ADMIN header string true "Токен администратора"
|
||||
// @Param body body domain.SessionPageRequest true "Тело запроса"
|
||||
// @Success 200 {object} domain.SessionResponse
|
||||
// @Failure 400 {object} apierrors.Error "Невалидное тело запроса"
|
||||
// @Failure 500 {object} apierrors.Error
|
||||
// @Router /session/all [POST]
|
||||
//
|
||||
// @Tags session
|
||||
// @Summary Получение списка сессий
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param X-AUTH-ADMIN header string true "Токен администратора"
|
||||
// @Param body body domain.SessionPageRequest true "Тело запроса"
|
||||
// @Success 200 {object} domain.SessionResponse
|
||||
// @Failure 400 {object} apierrors.Error "Невалидное тело запроса"
|
||||
// @Failure 500 {object} apierrors.Error
|
||||
// @Router /session/all [POST]
|
||||
func (c Session) All(ctx context.Context, req domain.SessionPageRequest) (*domain.SessionResponse, error) {
|
||||
if req.Order == nil {
|
||||
req.Order = &domain.OrderParams{
|
||||
@@ -44,16 +45,17 @@ func (c Session) All(ctx context.Context, req domain.SessionPageRequest) (*domai
|
||||
}
|
||||
|
||||
// Revoke
|
||||
// @Tags session
|
||||
// @Summary Отзыв сессии
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param X-AUTH-ADMIN header string true "Токен администратора"
|
||||
// @Param body body domain.RevokeRequest true "Тело запроса"
|
||||
// @Success 200
|
||||
// @Failure 400 {object} apierrors.Error "Невалидное тело запроса"
|
||||
// @Failure 500 {object} apierrors.Error
|
||||
// @Router /session/revoke [POST]
|
||||
//
|
||||
// @Tags session
|
||||
// @Summary Отзыв сессии
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param X-AUTH-ADMIN header string true "Токен администратора"
|
||||
// @Param body body domain.RevokeRequest true "Тело запроса"
|
||||
// @Success 200
|
||||
// @Failure 400 {object} apierrors.Error "Невалидное тело запроса"
|
||||
// @Failure 500 {object} apierrors.Error
|
||||
// @Router /session/revoke [POST]
|
||||
func (c Session) Revoke(ctx context.Context, req domain.RevokeRequest) error {
|
||||
return c.service.Revoke(ctx, req.Id)
|
||||
}
|
||||
Reference in new issue
Block a user