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