mirror of
https://github.com/privacy-scaling-explorations/pse.dev.git
synced 2026-01-14 00:28:28 -05:00
15 lines
400 B
TypeScript
15 lines
400 B
TypeScript
import { NextResponse } from 'next/server'
|
|
import { getAnnouncementChannelMessages } from '@/common/discord'
|
|
|
|
export async function GET() {
|
|
try {
|
|
const announcements = await getAnnouncementChannelMessages()
|
|
return NextResponse.json(
|
|
{ announcements: announcements ?? [] },
|
|
{ status: 200 }
|
|
)
|
|
} catch (error) {
|
|
return NextResponse.json({ error }, { status: 500 })
|
|
}
|
|
}
|