Skip to content

Commit 166d2f2

Browse files
author
Alex_Miao_WSL
committed
fix: SQL sub query alias
1 parent 66e794b commit 166d2f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/server/src/service/answer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub async fn user_is_answer_owner(
1313
SELECT FROM answers ans
1414
JOIN applications app ON ans.application_id = app.id
1515
WHERE ans.id = $1 AND app.user_id = $2
16-
)
16+
) sub
1717
)
1818
",
1919
answer_id,

backend/server/src/service/application.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub async fn user_is_application_owner(
4343
SELECT EXISTS(
4444
SELECT 1 FROM (
4545
SELECT FROM applications WHERE id = $1 AND user_id = $2
46-
)
46+
) sub
4747
)
4848
",
4949
application_id,

0 commit comments

Comments
 (0)