forked from mtusi2026/mtusi2026lab2
test: adapt HTTP checks to persistent Bearer sessions
This commit is contained in:
+4
-2
@@ -150,7 +150,8 @@ class PostgresRepository:
|
||||
try:
|
||||
with self.database.connection() as conn:
|
||||
conn.execute(
|
||||
"INSERT INTO messages(id,chat_id,sender_id,text,created_at) "
|
||||
"INSERT INTO messages(id,chat_id,sender_id,"
|
||||
"text,created_at) "
|
||||
"VALUES(%s,%s,%s,%s,%s)",
|
||||
(
|
||||
message.id,
|
||||
@@ -174,7 +175,8 @@ class PostgresRepository:
|
||||
with self.database.connection() as conn:
|
||||
rows = conn.execute(
|
||||
"SELECT c.id,c.title,c.created_at,ARRAY(SELECT user_id "
|
||||
"FROM members WHERE chat_id=c.id ORDER BY position) member_ids "
|
||||
"FROM members WHERE chat_id=c.id "
|
||||
"ORDER BY position) member_ids "
|
||||
"FROM chats c JOIN members own ON own.chat_id=c.id "
|
||||
"WHERE own.user_id=%s "
|
||||
+ condition
|
||||
|
||||
Reference in New Issue
Block a user