refactor: use NextResponse

This commit is contained in:
Riccardo
2024-06-18 12:22:53 +02:00
parent e0b89237fb
commit c75d5b6936
5 changed files with 10 additions and 5 deletions

View File

@@ -8,9 +8,10 @@ import {
} from '@utils/statusCodes';
import { getSingleNews, getTopNews } from '@utils/urls';
import { NewsDatabaseSchema, NewsDatabaseType } from '@utils/validationSchemas';
import { NextRequest } from 'next/server';
import { Resend } from 'resend';
export async function GET(request: Request) {
export async function GET(request: NextRequest) {
if (
request.headers.get('Authorization') !== `Bearer ${process.env.CRON_SECRET}`
) {