MSP-5186 Add /application_group/get_all endpoint

This commit is contained in:
Синельник Тимур Романович committed 2025-04-03 14:01:28 +03:00
1 parent 199d576956
commit 4e85278a63
7 files changed
+100

No files matched your search

+15
View File
@@ -15,6 +15,7 @@ type AppGroupService interface {
Update(ctx context.Context, req domain.UpdateAppGroupRequest) (*domain.AppGroup, error)
DeleteList(ctx context.Context, req domain.IdListRequest) (*domain.DeleteResponse, error)
GetByIdList(ctx context.Context, idList []int) ([]domain.AppGroup, error)
GetAll(ctx context.Context) ([]domain.AppGroup, error)
}
type AppGroup struct {
@@ -122,3 +123,17 @@ func (c AppGroup) DeleteList(ctx context.Context, req domain.IdListRequest) (*do
func (c AppGroup) GetByIdList(ctx context.Context, req domain.IdListRequest) ([]domain.AppGroup, error) {
return c.service.GetByIdList(ctx, req.IdList)
}
// GetAll godoc
//
// @Tags application_group
// @Summary Получить группы приложений
// @Description Возвращает все группы приложений
// @Accept json
// @Produce json
// @Success 200 {array} domain.AppGroup
// @Failure 500 {object} apierrors.Error
// @Router /application_group/get_all [POST]
func (c AppGroup) GetAll(ctx context.Context) ([]domain.AppGroup, error) {
return c.service.GetAll(ctx)
}