const query = await db.execute(sql`
WITH "new_thread" AS (
INSERT INTO
thread (title, body, author_id, topic_id)
VALUES (
${newThread.title},
${newThread.body},
${newThread.authorID},
${newThread.topicID}
)
RETURNING author_id
)
SELECT
id, username
FROM
new_thread
LEFT JOIN
auth_user
ON auth_user.id = new_thread.author_id
;
`)
const query = await db.execute(sql`
WITH "new_thread" AS (
INSERT INTO
thread (title, body, author_id, topic_id)
VALUES (
${newThread.title},
${newThread.body},
${newThread.authorID},
${newThread.topicID}
)
RETURNING author_id
)
SELECT
id, username
FROM
new_thread
LEFT JOIN
auth_user
ON auth_user.id = new_thread.author_id
;
`)