[common/components] chore: 알림 api 수정

This commit is contained in:
2025-08-07 18:48:32 +09:00
parent f132a30b5c
commit 1815ea6d0b
2 changed files with 3 additions and 3 deletions
@@ -70,14 +70,14 @@ const getNoticeUserList = async (
};
const getUnreadNoticeCount = async (recvUnqId: string) => {
const response = await client.get<PageableList<NoticeUser>>(
const response = await client.get<number>(
`${ENDPOINT.CMS_SERVICE.NOTICE_USER}/${recvUnqId}/unread/count`,
);
return response.data;
};
const readNotice = async (notiId: number) => {
const response = await client.post(
const response = await client.put(
`${ENDPOINT.CMS_SERVICE.NOTICE}/${notiId}/read`,
);
return response.data;
@@ -92,7 +92,7 @@ export function NoticePopover() {
<Popover open={open} onOpenChange={setOpen}>
<PopoverTrigger asChild>
<div className="flex w-full items-center gap-2 text-left">
알림 <Badge>{unreadNoticeCount?.totalElements ?? 0}</Badge>
알림 <Badge>{unreadNoticeCount ?? 0}</Badge>
</div>
</PopoverTrigger>
<PopoverContent className="w-[32rem] border-border px-0">