mirror of
https://github.com/supabase/supabase.git
synced 2026-07-07 03:34:27 +08:00
* Hide the logout button in selfhosted version. * Don't call project-eligibility-query on selfhosted version. * Add local api handlers for self-hosting version. * Fix a missing monaco editor file in the self-hosting version. * Deleted an obsolete api route. * Import the right get function.
25 lines
793 B
TypeScript
25 lines
793 B
TypeScript
import { NextApiRequest, NextApiResponse } from 'next'
|
|
|
|
import apiWrapper from 'lib/api/apiWrapper'
|
|
import { extractResponse } from 'pages/api/constants'
|
|
|
|
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 handleGet(req, res)
|
|
default:
|
|
res.setHeader('Allow', ['GET'])
|
|
res.status(405).json({ data: null, error: { message: `Method ${method} Not Allowed` } })
|
|
}
|
|
}
|
|
|
|
type ResponseData = extractResponse<'/platform/integrations/github/connections', 'get'>
|
|
|
|
const handleGet = async (req: NextApiRequest, res: NextApiResponse<ResponseData>) => {
|
|
return res.status(200).json({ connections: [] })
|
|
}
|