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