mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 07:39:07 +03:00
* Move all studio files from /studio to /apps/studio. * Move studio specific prettier ignores. * Fix the ui references from studio. * Fix the css imports. * Fix all package.json issues. * Fix the prettier setup for the studio app. * Add .turbo folder to prettierignore. * Fix the github workflows.
31 lines
866 B
TypeScript
31 lines
866 B
TypeScript
import { NextApiRequest, NextApiResponse } from 'next'
|
|
|
|
import apiWrapper from 'lib/api/apiWrapper'
|
|
import { DEFAULT_PROJECT, PROJECT_REST_URL } 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` } })
|
|
}
|
|
}
|
|
|
|
const handleGet = async (req: NextApiRequest, res: NextApiResponse) => {
|
|
// Platform specific endpoint
|
|
const response = {
|
|
...DEFAULT_PROJECT,
|
|
connectionString: '',
|
|
kpsVersion: 'kps-v1.0.0',
|
|
restUrl: PROJECT_REST_URL,
|
|
}
|
|
|
|
return res.status(200).json(response)
|
|
}
|