modified: proxy.ts

This commit is contained in:
Anderson 2026-02-12 22:26:34 +00:00 committed by GitHub
parent 2029197137
commit 3dcd638f99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View file

@ -7,11 +7,12 @@ const prisma = new PrismaClient()
// GET /api/channels/[slug]/followers - Get channel followers
export async function GET(
req: NextRequest,
{ params }: { params: { slug: string } }
{ params }: { params: Promise<{ slug: string }> }
) {
try {
const { slug } = await params
const channel = await prisma.channel.findUnique({
where: { slug: params.slug },
where: { slug },
include: {
followers: {
select: {

View file

@ -5,11 +5,12 @@ const prisma = new PrismaClient()
export async function GET(
req: NextRequest,
{ params }: { params: { slug: string } }
{ params }: { params: Promise<{ slug: string }> }
) {
try {
const { slug } = await params
const channel = await prisma.channel.findUnique({
where: { slug: params.slug },
where: { slug },
include: {
user: true,
stats: true,

View file

@ -1,7 +1,7 @@
import { createServerClient } from '@supabase/ssr'
import { NextResponse, NextRequest } from 'next/server'
export async function middleware(req: NextRequest) {
export async function proxy(req: NextRequest) {
const res = NextResponse.next()
const supabase = createServerClient(