* much longer cache for releases * lots of cache changes etc * fix vercel url issue * fix small further things * only revalidate on actions that actually cause caches to get stale
11 lines
235 B
TypeScript
11 lines
235 B
TypeScript
import type { ParsedUrlQuery } from "querystring";
|
|
|
|
export function getSingleQueryValue(
|
|
query: ParsedUrlQuery = {},
|
|
key: string,
|
|
): string | undefined {
|
|
const _val = query[key];
|
|
|
|
return Array.isArray(_val) ? _val[0] : _val;
|
|
}
|