File size: 395 Bytes
a9df3bb
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import { type NextRequest } from 'next/server'
import { NextResponse } from 'next/server'
import { getInfo, setSession, client } from '@/app/api/utils/common'

export async function GET(request: NextRequest) {
  const { sessionId, user } = getInfo(request);
  const { data }: any = await client.getConversations(user);
  return NextResponse.json(data, {
    headers: setSession(sessionId)
  })
}