Skip to content

Commit

Permalink
[MOD]: 공지사항 조회 API, 푸시알림 타이틀 버전정보와 합치기 #121
Browse files Browse the repository at this point in the history
  • Loading branch information
kimchaeeun3447 committed Jan 28, 2023
1 parent 4d151e4 commit 098a25e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/services/MumentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -852,9 +852,11 @@ const getNoticeList = async (): Promise<NoticeInfoRDB[]> => {
let noticeList: NoticeInfoRDB[] = await pools.query(selectNoticeQuery);

const noticeListDateFormat = async (item: NoticeInfoRDB, idx: number) => {
const notcieFullTitle = (!item.notice_point_word) ? item.title: item.notice_point_word + item.title;

noticeList[idx] = {
id: item.id,
title: item.title,
title: notcieFullTitle,
content: item.content,
created_at: dayjs(item.created_at).format('YYYY.MM.DD')
};
Expand Down
2 changes: 1 addition & 1 deletion src/services/UserService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ const postNotice = async (point: string | null, title: string, content:string, n
const createdNoticeRow: NoticeInfoRDB[] = await connection.query(
'SELECT * FROM notice WHERE id=?', [createdNotice.insertId]
);
const noticeTitle = createdNoticeRow[0].title;
const noticeTitle = (!createdNoticeRow[0].notice_point_word) ? createdNoticeRow[0].title: createdNoticeRow[0].notice_point_word + createdNoticeRow[0].title;;
const noticeId = createdNoticeRow[0].id;
const noticePointWord = createdNoticeRow[0].notice_point_word;
let fcmTokenList: string[] = [];
Expand Down

0 comments on commit 098a25e

Please sign in to comment.