Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/webview/src/apis/slack/sendMessage.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const sendMessageToErrorChannel = (message: string) => {
return fetch(process.env.NEXT_PUBLIC_SLACK_ERROR_CHANNEL_WEBHOOK_URL, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: JSON.stringify({ text: message }),
});
// return fetch(process.env.NEXT_PUBLIC_SLACK_ERROR_CHANNEL_WEBHOOK_URL, {
// method: 'POST',
// headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
// body: JSON.stringify({ text: message }),
// });
};
17 changes: 7 additions & 10 deletions apps/webview/src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
'use client';

import { useEffect } from 'react';
import { usePathname, useRouter } from 'next/navigation';
import { css } from '_panda/css';

import { sendMessageToErrorChannel } from '@/apis/slack/sendMessage';
import { ErrorPage } from '@/components/Error/ErrorPage';
import { isDev } from '@/constants/env';
import { GITHUB_ISSUE_URL } from '@/constants/outlink';

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

useEffect(() => {
if (isDev) return;
// useEffect(() => {
// if (isDev) return;

sendMessageToErrorChannel(`<!here>
🌌 Not Found 🌌
Path: ${pathname}
`);
}, [pathname]);
// sendMessageToErrorChannel(`<!here>
// 🌌 Not Found 🌌
// Path: ${pathname}
// `);
// }, [pathname]);

const router = useRouter();

Expand Down
8 changes: 6 additions & 2 deletions packages/api/src/auction/getProductHistories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const GetProductHistoriesRequestSchema = z.object({
pageNumber: z.number().optional(),
personaType: z.string().optional(),
count: z.number().optional(),
orderType: z.union([z.literal('PRICE'), z.literal('CREATED_AT'), z.literal('LEVEL')]).optional(),
orderType: z
.union([z.literal('PRICE'), z.literal('CREATED_AT'), z.literal('LEVEL'), z.literal('SOLD_AT')])
.optional(),
sortDirection: z.union([z.literal('ASC'), z.literal('DESC')]).optional(),
});

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

export const getHistory = async (request?: GetProductHistoriesRequest): Promise<GetProductHistoriesResponse> => {
const orderType = request?.orderType && request?.orderType === 'CREATED_AT' ? 'SOLD_AT' : request?.orderType;

return await safeGet(GetProductHistoriesResponseSchema)(`/auctions/products/histories`, {
params: request ? convertCamelObjToKebab(request) : undefined,
params: request ? convertCamelObjToKebab({ ...request, orderType }) : undefined,
});
};
Loading