fix getConv

This commit is contained in:
kinou-p 2023-06-09 17:17:36 +02:00
parent 7085fc1f8d
commit 47863325ea

View File

@ -31,7 +31,7 @@ export class ChatService {
// import { createConnection } from 'typeorm'; // import { createConnection } from 'typeorm';
async getConv(username: string): Promise<Conv[]>{ async getConv(username: string): Promise<Conv[]>{
username = "apommier" // username = "apommier"
const convs = await this.chatRepository.query("SELECT * FROM \"conv\" WHERE $1 = ANY (ARRAY[members]);", [username]) const convs = await this.chatRepository.query("SELECT * FROM \"conv\" WHERE $1 = ANY (ARRAY[members]);", [username])
console.log(`convs= ${convs}`) console.log(`convs= ${convs}`)
return convs; return convs;