Skip to content

Commit 5cd4b7d

Browse files
sumisumi
authored andcommitted
fix: history에서는 SOLD_AT으로 부르기
1 parent e9294cb commit 5cd4b7d

3 files changed

Lines changed: 18 additions & 17 deletions

File tree

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const sendMessageToErrorChannel = (message: string) => {
2-
return fetch(process.env.NEXT_PUBLIC_SLACK_ERROR_CHANNEL_WEBHOOK_URL, {
3-
method: 'POST',
4-
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
5-
body: JSON.stringify({ text: message }),
6-
});
2+
// return fetch(process.env.NEXT_PUBLIC_SLACK_ERROR_CHANNEL_WEBHOOK_URL, {
3+
// method: 'POST',
4+
// headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
5+
// body: JSON.stringify({ text: message }),
6+
// });
77
};

apps/webview/src/app/not-found.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
'use client';
22

3-
import { useEffect } from 'react';
43
import { usePathname, useRouter } from 'next/navigation';
54
import { css } from '_panda/css';
65

7-
import { sendMessageToErrorChannel } from '@/apis/slack/sendMessage';
86
import { ErrorPage } from '@/components/Error/ErrorPage';
9-
import { isDev } from '@/constants/env';
107
import { GITHUB_ISSUE_URL } from '@/constants/outlink';
118

129
export default function NotFound() {
1310
const pathname = usePathname();
1411

15-
useEffect(() => {
16-
if (isDev) return;
12+
// useEffect(() => {
13+
// if (isDev) return;
1714

18-
sendMessageToErrorChannel(`<!here>
19-
🌌 Not Found 🌌
20-
Path: ${pathname}
21-
`);
22-
}, [pathname]);
15+
// sendMessageToErrorChannel(`<!here>
16+
// 🌌 Not Found 🌌
17+
// Path: ${pathname}
18+
// `);
19+
// }, [pathname]);
2320

2421
const router = useRouter();
2522

packages/api/src/auction/getProductHistories.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ const GetProductHistoriesRequestSchema = z.object({
88
pageNumber: z.number().optional(),
99
personaType: z.string().optional(),
1010
count: z.number().optional(),
11-
orderType: z.union([z.literal('PRICE'), z.literal('CREATED_AT'), z.literal('LEVEL')]).optional(),
11+
orderType: z
12+
.union([z.literal('PRICE'), z.literal('CREATED_AT'), z.literal('LEVEL'), z.literal('SOLD_AT')])
13+
.optional(),
1214
sortDirection: z.union([z.literal('ASC'), z.literal('DESC')]).optional(),
1315
});
1416

@@ -21,7 +23,9 @@ export type GetProductHistoriesRequest = z.infer<typeof GetProductHistoriesReque
2123
export type GetProductHistoriesResponse = z.infer<typeof GetProductHistoriesResponseSchema>;
2224

2325
export const getHistory = async (request?: GetProductHistoriesRequest): Promise<GetProductHistoriesResponse> => {
26+
const orderType = request?.orderType && request?.orderType === 'CREATED_AT' ? 'SOLD_AT' : request?.orderType;
27+
2428
return await safeGet(GetProductHistoriesResponseSchema)(`/auctions/products/histories`, {
25-
params: request ? convertCamelObjToKebab(request) : undefined,
29+
params: request ? convertCamelObjToKebab({ ...request, orderType }) : undefined,
2630
});
2731
};

0 commit comments

Comments
 (0)