mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
23 lines
705 B
TypeScript
23 lines
705 B
TypeScript
import { NextApiRequest, NextApiResponse } from 'next'
|
|
import apiWrapper from 'lib/api/apiWrapper'
|
|
|
|
export default (req: NextApiRequest, res: NextApiResponse) => apiWrapper(req, res, handler)
|
|
|
|
async function handler(req: NextApiRequest, res: NextApiResponse) {
|
|
const { method } = req
|
|
|
|
switch (method) {
|
|
case 'GET':
|
|
return handleGetAll(req, res)
|
|
default:
|
|
res.setHeader('Allow', ['GET'])
|
|
res.status(405).json({ data: null, error: { message: `Method ${method} Not Allowed` } })
|
|
}
|
|
}
|
|
|
|
const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
|
|
return res
|
|
.status(200)
|
|
.json({ dbSize: '888888', authUsers: '0', bucketSize: '888888', dbTables: '0' })
|
|
}
|