import { HttpService , Injectable } from '@nestjs/common' ; import { InjectRepository } from '@nestjs/typeorm' ; import { Like , Repository } from 'typeorm' ; import { School } from '../dto/school.dto' ; import { School as SchoolEntity } from '../entity/school.entity' ; @ Injectable ( ) export class SchoolService { constructor ( private http , @ InjectRepository ( SchoolEntity ) private readonly repository ) { } public async getUserSchool ( name ) { return await this . repository . find ( { where : { school : Like ( `%${ name }%` ) } } ) ; } }