Skip to content

Commit cca0204

Browse files
committed
add search attribute api
1 parent d289cc8 commit cca0204

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/route-handlers/get-search-attributes/get-search-attributes.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { type NextRequest, NextResponse } from 'next/server';
22

3-
import decodeUrlParams from '@/utils/decode-url-params';
43
import { getHTTPStatusCode, GRPCError } from '@/utils/grpc/grpc-error';
54
import logger, { type RouteHandlerErrorPayload } from '@/utils/logger';
65

@@ -17,7 +16,7 @@ export default async function getSearchAttributes(
1716
requestParams: RequestParams,
1817
ctx: Context
1918
): Promise<Response> {
20-
const decodedParams = decodeUrlParams(requestParams.params) as RouteParams;
19+
const params = requestParams.params as RouteParams;
2120
const category = request.nextUrl.searchParams.get('category');
2221

2322
try {
@@ -45,7 +44,7 @@ export default async function getSearchAttributes(
4544
} satisfies GetSearchAttributesResponse);
4645
} catch (e) {
4746
logger.error<RouteHandlerErrorPayload>(
48-
{ requestParams: decodedParams, error: e },
47+
{ requestParams: params, error: e },
4948
'Failed to fetch search attributes from Cadence service'
5049
);
5150

0 commit comments

Comments
 (0)