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; }; 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();