package aapitemplate

import (
	"net/http"

	"github.com/tech/sendico/server/interface/api/sresponse"
)

func (a *AccountAPI[T]) Objects(items []T, accessToken *sresponse.TokenData) http.HandlerFunc {
	return sresponse.ObjectsAuth(a.Logger, items, accessToken, a.Name())
}

func (a *AccountAPI[T]) Object(item *T, accessToken *sresponse.TokenData) http.HandlerFunc {
	return sresponse.ObjectAuth(a.Logger, item, accessToken, a.Name())
}

func (a *AccountAPI[T]) ObjectCreated(item *T, accessToken *sresponse.TokenData) http.HandlerFunc {
	return sresponse.ObjectAuthCreated(a.Logger, item, accessToken, a.Name())
}
