Skip to content

Commit

Permalink
Merge pull request #240 from UMC-README/dev
Browse files Browse the repository at this point in the history
chore: sql 오류 수정
  • Loading branch information
jshong99 authored Aug 20, 2024
2 parents 2a2e88c + 2e69145 commit b80f6e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions domains/admin/admin.sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ export const userSubmitSQL = `

// 하나의 공지글에 대한 확인 요청 내역 (대기 or 승인 완료) 조회
export const getSubmitStateSQL = `
SELECT s.id AS submit_id, u.profile_image, u.nickname, GROUP_CONCAT(si.URL ORDER BY si.created_at SEPARATOR ',') AS images, s.content, s.submit_state
SELECT s.id AS submit_id, ur.profile_image, ur.nickname, GROUP_CONCAT(si.URL ORDER BY si.created_at SEPARATOR ',') AS images, s.content, s.submit_state
FROM post p
JOIN submit s ON p.id = s.post_id
JOIN user u ON s.user_id = u.id
JOIN \`user-room\` ur ON s.user_id = ur.user_id
LEFT JOIN \`submit-image\` si ON s.id = si.submit_id
WHERE p.room_id = ? AND p.id = ? AND s.submit_state = ? AND si.state = 'EXIST'
GROUP BY s.id;
Expand Down

0 comments on commit b80f6e6

Please sign in to comment.