* feat: add link to oss friends to footer * feat: add oss friends page * chore: build lang * feat: add skeleton loader * chore: rebuild lang * chore: rebuild lang
24 lines
667 B
TypeScript
24 lines
667 B
TypeScript
import type { NextApiRequest, NextApiResponse } from "next";
|
|
|
|
export default async function handler(
|
|
req: NextApiRequest,
|
|
res: NextApiResponse,
|
|
) {
|
|
if (req.method !== "GET") {
|
|
return res.status(405).json({ message: "Method not allowed" });
|
|
}
|
|
|
|
try {
|
|
const response = await fetch("https://formbricks.com/api/oss-friends");
|
|
if (!response.ok) {
|
|
throw new Error("Failed to fetch from Formbricks");
|
|
}
|
|
const data = await response.json();
|
|
|
|
return res.status(200).json(data);
|
|
} catch (error) {
|
|
console.error("Error fetching OSS friends:", error);
|
|
return res.status(500).json({ message: "Failed to fetch OSS friends" });
|
|
}
|
|
}
|