package task

import (
	"context"

	v1 "server/api/task/v1"
	"server/internal/model"
	"server/internal/service"
)

func (c *ControllerV1) AppList(ctx context.Context, req *v1.AppListReq) (res *v1.AppListRes, err error) {
	out, err := service.Task().AppList(ctx, &model.TaskAppListIn{})
	if err != nil {
		return nil, err
	}
	return &v1.AppListRes{
		List: out.List,
	}, nil
}
