recommender/internal/service/auth/compare.go

15 lines
260 B
Go
Raw Normal View History

2024-11-06 10:47:56 +00:00
package auth
import (
"context"
"go-template/internal/schema"
)
type HasUserInterface interface {
GetUserId() schema.UserId
}
func (a *Service) Compare(ctx context.Context, entity HasUserInterface) bool {
return entity.GetUserId() == a.GetUserId(ctx)
}