This commit is contained in:
Little Dipper 2023-06-14 01:52:58 +02:00
parent fcd7fdc905
commit ce88b4e163

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 = "sadjigui"
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;