diff --git a/src/apis/notice/service.ts b/src/apis/notice/service.ts index efd7539..f4e9eca 100644 --- a/src/apis/notice/service.ts +++ b/src/apis/notice/service.ts @@ -43,7 +43,7 @@ const updateNotice = (notices: Notices[]) => { export const getNotices = async (department: string): Promise => { const majorId = await getDepartmentIdByMajor(department); - const query = `SELECT * FROM major_notices WHERE department_id = ${majorId};`; + const query = `SELECT * FROM major_notices WHERE department_id = ${majorId} ORDER BY STR_TO_DATE(upload_date, '%Y-%m-%d') DESC;`; const major_notices = await selectQuery(query); const notices: SeparateNoti = {