package sresponse

import (
	"net/http"

	"github.com/tech/sendico/pkg/api/http/response"
	"github.com/tech/sendico/pkg/mlogger"
	"github.com/tech/sendico/pkg/model"
)

type invitationResp struct {
	Invitation model.PublicInvitation `json:"invitation"`
}

func Invitation(logger mlogger.Logger, invitation *model.PublicInvitation) http.HandlerFunc {
	return response.Ok(logger, &invitationResp{Invitation: *invitation})
}

func Invitations(logger mlogger.Logger, invitations []model.Invitation) http.HandlerFunc {
	return response.Ok(logger, invitations)
}
