Public
Back
Version 5
8/10/2024
/** @jsxImportSource npm:react **/
import { renderToString } from "npm:react-dom@18/server";
// API Key belirle
const API_KEY = "f456aa0a-5654-11ef-84a9-de64eea55b61"; // Buraya kendi API anahtarınızı yazın
export default (req: Request) => {
// API Key doğrulama
const url = new URL(req.url);
const apiKey = url.searchParams.get("api_key");
if (apiKey !== API_KEY) {
return new Response(
JSON.stringify({ error: "Unauthorized: Invalid API Key" }),
{
status: 401,
headers: {
"Content-Type": "application/json",
"Access-Control-Allow-Origin": "*",
},
},
);
}
// Albüm verisi
const albumData = {
album: {
name: "Büyük İnsan",
slug: "buyuk-insan",
year: 2008,
category: "Pop",
how_many_songs: 12,
album_cover: "https://link-to-album-cover.jpg",
for_single: false,
album_details: "Gökhan Türkmen'in 2008 yılında çıkardığı albüm.",
spotify_link: "https://open.spotify.com/album/spotify_link",
cingozilyas-buyukinsan.web.val.run
Updated: August 14, 2024