Skip to content

Commit

Permalink
fcriando metodo para listar regitros de um user #58
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelSSan28 committed Jun 16, 2021
1 parent 9b10b80 commit 2bd854d
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions backend/src/services/EmotionalReactionService.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { getRepository, Repository } from 'typeorm';
import { EmotionalReaction } from '../entities/EmotionalReaction';

class EmotionalReactionService{
private emotionalReactionRepository:Repository<EmotionalReaction>;

constructor(){
this.emotionalReactionRepository = getRepository(EmotionalReaction);
}

async listByUser(client_id:string):Promise<EmotionalReaction[]>{

const emotionalReactions = await this.emotionalReactionRepository.find({ where:{client_id} });

return emotionalReactions;
}




}

export {EmotionalReactionService}

0 comments on commit 2bd854d

Please sign in to comment.