mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
14 lines
344 B
TypeScript
14 lines
344 B
TypeScript
import type { NextApiRequest, NextApiResponse } from "next";
|
|
import type { User } from "../../interfaces";
|
|
|
|
// Fake users data
|
|
const users: User[] = [{ id: 1 }, { id: 2 }, { id: 3 }];
|
|
|
|
export default function handler(
|
|
_req: NextApiRequest,
|
|
res: NextApiResponse<User[]>,
|
|
) {
|
|
// Get data from your database
|
|
res.status(200).json(users);
|
|
}
|