MSMES as the New Engine of Credit Growth – A Case-Based Analysis of Bank Lending Trends in India
Author: Mr. Sabir Nasir Mujawar
International Journal of Scientific Research & Engineering Trends
Year of Publication: 2025
Abstract
import { NextRequest, NextResponse } from "next/server"; import { supabaseServer } from "@/lib/supabaseServer"; /* ---------- TRANSFORM DATA ---------- */ function transform(record: any) { return { id: record.id, title: record.title, authors: record.authors, journal: record.journal, published_at: record.published_at, abstract: record.abstract, keywords: record.keywords, citation: record.citation, doi: record.doi, paper_link: record.paper_link, created_at: record.created_at, updated_at: record.updated_at }; } /* ---------- GET SINGLE PAPER ---------- */ export async function GET( _req: NextRequest, context: { params: Promise<{ id: string }> } ) { const { id } = await context.params; const { data, error } = await supabaseServer .from("research_papers") .select("*") .eq("id", id) .single(); if (error || !data) { return NextResponse.json( { error: "Research paper not found" }, { status: 404 } ); } return NextResponse.json(transform(data)); } /* ---------- UPDATE PAPER ---------- */ export async function PUT( req: NextRequest, context: { params: Promise<{ id: string }> } ) { const { id } = await context.params; const body = await req.json(); const updatePayload = { title: body.title || null, authors: body.authors || null, journal: body.journal || null, abstract: body.abstract || null, keywords: body.keywords || null, citation: body.citation || null, doi: body.doi || null, paper_link: body.paper_link || null, published_at: body.published_at || null, updated_at: new Date() }; const { data, error } = await supabaseServer .from("research_papers") .update(updatePayload) .eq("id", id) .select() .single(); if (error) { return NextResponse.json( { error: error.message }, { status: 500 } ); } return NextResponse.json(transform(data)); } /* ---------- DELETE PAPER ---------- */ export async function DELETE( _req: NextRequest, context: { params: Promise<{ id: string }> } ) { const { id } = await context.params; const { error } = await supabaseServer .from("research_papers") .delete() .eq("id", id); if (error) { return NextResponse.json( { error: error.message }, { status: 500 } ); } return NextResponse.json({ success: true }); }
Citation
import { NextRequest, NextResponse } from "next/server"; import { supabaseServer } from "@/lib/supabaseServer"; /* ---------- TRANSFORM DATA ---------- */ function transform(record: any) { return { id: record.id, title: record.title, authors: record.authors, journal: record.journal, published_at: record.published_at, abstract: record.abstract, keywords: record.keywords, citation: record.citation, doi: record.doi, paper_link: record.paper_link, created_at: record.created_at, updated_at: record.updated_at }; } /* ---------- GET SINGLE PAPER ---------- */ export async function GET( _req: NextRequest, context: { params: Promise<{ id: string }> } ) { const { id } = await context.params; const { data, error } = await supabaseServer .from("research_papers") .select("*") .eq("id", id) .single(); if (error || !data) { return NextResponse.json( { error: "Research paper not found" }, { status: 404 } ); } return NextResponse.json(transform(data)); } /* ---------- UPDATE PAPER ---------- */ export async function PUT( req: NextRequest, context: { params: Promise<{ id: string }> } ) { const { id } = await context.params; const body = await req.json(); const updatePayload = { title: body.title || null, authors: body.authors || null, journal: body.journal || null, abstract: body.abstract || null, keywords: body.keywords || null, citation: body.citation || null, doi: body.doi || null, paper_link: body.paper_link || null, published_at: body.published_at || null, updated_at: new Date() }; const { data, error } = await supabaseServer .from("research_papers") .update(updatePayload) .eq("id", id) .select() .single(); if (error) { return NextResponse.json( { error: error.message }, { status: 500 } ); } return NextResponse.json(transform(data)); } /* ---------- DELETE PAPER ---------- */ export async function DELETE( _req: NextRequest, context: { params: Promise<{ id: string }> } ) { const { id } = await context.params; const { error } = await supabaseServer .from("research_papers") .delete() .eq("id", id); if (error) { return NextResponse.json( { error: error.message }, { status: 500 } ); } return NextResponse.json({ success: true }); }
