mirror of
https://github.com/Xevion/xevion.dev.git
synced 2025-12-06 01:16:58 -06:00
Use Record, not Map
This commit is contained in:
@@ -7,7 +7,7 @@ import { env } from "@/env/server.mjs";
|
|||||||
async function getURLs(
|
async function getURLs(
|
||||||
type: string,
|
type: string,
|
||||||
key: string | number,
|
key: string | number,
|
||||||
payload: Map<string, unknown>,
|
payload: Record<string, unknown>,
|
||||||
): Promise<string[] | null> {
|
): Promise<string[] | null> {
|
||||||
if (type == "project_link" || type == "project_technology") {
|
if (type == "project_link" || type == "project_technology") {
|
||||||
console.error({
|
console.error({
|
||||||
@@ -50,8 +50,8 @@ async function getURLs(
|
|||||||
const requestSchema = z.object({
|
const requestSchema = z.object({
|
||||||
type: z.string(),
|
type: z.string(),
|
||||||
keys: z.array(z.string().or(z.number().int())).min(1),
|
keys: z.array(z.string().or(z.number().int())).min(1),
|
||||||
source: z.map(z.string(), z.any()),
|
source: z.record(z.string(), z.any()),
|
||||||
payload: z.map(z.string(), z.any()),
|
payload: z.record(z.string(), z.any()),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default async function handler(
|
export default async function handler(
|
||||||
|
|||||||
Reference in New Issue
Block a user