From 36bc47125820d79dab6688ecb6f7da94e04bed7a Mon Sep 17 00:00:00 2001 From: Lee sang Yeop Date: Fri, 5 Jan 2024 19:47:16 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(apis/notice):=20=EC=B1=84=EC=9A=A9=20?= =?UTF-8?q?=EA=B3=B5=EC=A7=80=EC=82=AC=ED=95=AD=EC=9D=98=20=EB=B0=98?= =?UTF-8?q?=ED=99=98=EA=B0=92=EC=9D=84=20=ED=81=B4=EB=9D=BC=EC=9D=B4?= =?UTF-8?q?=EC=96=B8=ED=8A=B8=EC=97=90=20=EB=A7=9E=EA=B2=8C=20=EB=B0=98?= =?UTF-8?q?=ED=99=98=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/notice/service.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/apis/notice/service.ts b/src/apis/notice/service.ts index 31ca4b0..efd7539 100644 --- a/src/apis/notice/service.ts +++ b/src/apis/notice/service.ts @@ -9,8 +9,8 @@ import notificationToSlack from 'src/hooks/notificateToSlack'; import { getDepartmentIdByMajor } from 'src/utils/majorUtils'; interface SeparateNoti { - 고정: ResponseNotice[] | Notices[]; - 일반: ResponseNotice[] | Notices[]; + 고정: ResponseNotice[] | Notices[] | RecruitData[]; + 일반: ResponseNotice[] | Notices[] | RecruitData[]; } export interface ResponseNotice { @@ -98,7 +98,7 @@ export const getLanguage = async (): Promise => { return notices; }; -export const getRecruit = async (): Promise => { +export const getRecruit = async (): Promise => { const query = 'SELECT * FROM recruit_notices;'; const recruitNotices = await selectQuery(query); recruitNotices.sort( @@ -106,6 +106,10 @@ export const getRecruit = async (): Promise => { new Date(notice2.recruitment_period.split('~')[0]).getTime() - new Date(notice1.recruitment_period.split('~')[0]).getTime(), ); + const notices: SeparateNoti = { + 일반: recruitNotices, + 고정: [], + }; - return recruitNotices; + return notices; }; From 2fa6e94b4773e010eea5cb1f5c53285dfb943806 Mon Sep 17 00:00:00 2001 From: Lee sang Yeop Date: Fri, 5 Jan 2024 20:03:18 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix(index.ts):=20=EC=84=9C=EB=B2=84=20?= =?UTF-8?q?=EC=B2=AB=20=EC=8B=A4=ED=96=89=20=EC=8B=9C=20=EB=8F=99=EC=9E=91?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=ED=95=A8=EC=88=98=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 0fcdcbf..80496f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -46,7 +46,6 @@ const handleDeployToServer = async () => { // 이 함수는 현재 배포되어있는 서버를 위해 사용되는 로직이며 최초 서버에 배포되는 1회만 실행되도록 하기위한 함수에요 // 그렇기에 아래에 작성된 코드들은 배포서버에 배포되면 다음 배포전 수정해주세요!! // 전공 관련 크롤링 - await saveMajorNoticeToDB(); }; -handleDeployToServer(); +// handleDeployToServer();