package activity

import (
	"context"
	v1 "server/api/activity/v1"
	"server/internal/model"
	"server/internal/service"
)

func (c *ControllerV1) ItemSetStatus(ctx context.Context, req *v1.ItemSetStatusReq) (res *v1.ItemSetStatusRes, err error) {
	out, err := service.SignInRewardDetails().SetStatus(ctx, &model.SignInRewardDetailSetStatusIn{
		Id:     req.Id,
		Status: req.Status,
	})
	if err != nil {
		return nil, err
	}
	return &v1.ItemSetStatusRes{Success: out.Success}, nil
}
