← back to IWasCute

verification/TK-11380/production.patch

53 lines

diff --git a/src/app/api/admin/route.ts b/src/app/api/admin/route.ts
index 2a89946..e208e08 100644
--- a/src/app/api/admin/route.ts
+++ b/src/app/api/admin/route.ts
@@ -172,7 +172,14 @@ async function getUploadDetail(params: URLSearchParams) {
     WHERE u.id = $1
   `, [id])
 
-  const photos = await query(`SELECT * FROM photos WHERE upload_id = $1 ORDER BY created_at`, [id])
+  const photos = await query(`
+    SELECT id, upload_id, user_id, filename, file_size, mime_type,
+           storage_path, thumbnail_path, exif_date_taken, exif_year,
+           exif_latitude, exif_longitude, exif_camera_make, exif_camera_model,
+           exif_width, exif_height, clearance_level, view_count, license_count,
+           total_earnings, directory_name, created_at
+    FROM photos WHERE upload_id = $1 ORDER BY created_at
+  `, [id])
 
   return NextResponse.json({
     upload: upload.rows[0] || null,
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 4e80308..7d23708 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -17,6 +17,8 @@ const geistMono = Geist_Mono({
 export const metadata: Metadata = {
   title: "I was Cute — Your Childhood Photos, Legally Licensed",
   description: "Upload your childhood photos, clear the rights, and earn royalties.",
+  // Verify ownership without executing advertising code in photo/account flows.
+  other: { "google-adsense-account": "ca-pub-5278231299883833" },
 };
 
 export default function RootLayout({
@@ -31,11 +33,15 @@ export default function RootLayout({
     >
       <body className="min-h-full flex flex-col">
         <Script
-          async
-          src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5278231299883833"
-          crossOrigin="anonymous"
+          src="https://www.googletagmanager.com/gtag/js?id=G-2DHDBP8R78"
           strategy="afterInteractive"
         />
+        <Script id="ga4-init" strategy="afterInteractive">
+          {`window.dataLayer = window.dataLayer || [];
+function gtag(){dataLayer.push(arguments);}
+gtag("js", new Date());
+gtag("config", "G-2DHDBP8R78");`}
+        </Script>
         {children}
         <VersionSwitcher />
       </body>