import User from '../infra/typeorm/entities/User' ; import IUserLocationRepository from '../repositories/IUserLocationRepository' ; import { inject , injectable } from 'tsyringe' ; @ injectable ( ) class ShowNearbyUsers { constructor ( @ inject ( 'UsersLocationRepository' ) private usersLocationRepository ) { } public async execute ( user_id , radius , coordinates ) { const users = await this . usersLocationRepository . findNearby ( user_id , radius , coordinates ) ; return users ; } } export default ShowNearbyUsers ;