fix: data return format

This commit is contained in:
Ephraim Atta-Duncan
2024-10-24 11:05:54 +00:00
parent 364f9894b0
commit 25d4f1e101
5 changed files with 5 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ import type { NextRequest } from 'next/server';
import cors from '@/lib/cors';
const paths = [
{ path: '/total-prs', description: 'Total GitHub Forks' },
{ path: '/total-prs', description: 'Total GitHub Merged PRs' },
{ path: '/total-stars', description: 'Total GitHub Stars' },
{ path: '/total-forks', description: 'Total GitHub Forks' },
{ path: '/total-issues', description: 'Total GitHub Issues' },

View File

@@ -8,7 +8,7 @@ export async function GET(request: Request) {
return cors(
request,
new Response(JSON.stringify({ 'total-forks': transformedData }), {
new Response(JSON.stringify(transformedData), {
status: 200,
headers: {
'content-type': 'application/json',

View File

@@ -8,7 +8,7 @@ export async function GET(request: Request) {
return cors(
request,
new Response(JSON.stringify({ 'total-issues': transformedData }), {
new Response(JSON.stringify(transformedData), {
status: 200,
headers: {
'content-type': 'application/json',

View File

@@ -8,7 +8,7 @@ export async function GET(request: Request) {
return cors(
request,
new Response(JSON.stringify({ 'total-stars': transformedData }), {
new Response(JSON.stringify(transformedData), {
status: 200,
headers: {
'content-type': 'application/json',

View File

@@ -8,7 +8,7 @@ export async function GET(request: Request) {
return cors(
request,
new Response(JSON.stringify({ 'total-stars': transformedData }), {
new Response(JSON.stringify(transformedData), {
status: 200,
headers: {
'content-type': 'application/json',