diff --git a/apps/studio/pages/api/projects/[ref]/run-lints.ts b/apps/studio/pages/api/projects/[ref]/run-lints.ts new file mode 100644 index 00000000000..91c1e8d3ec2 --- /dev/null +++ b/apps/studio/pages/api/projects/[ref]/run-lints.ts @@ -0,0 +1,24 @@ +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/projects/{ref}/run-lints', 'get'> + +const handleGet = async (req: NextApiRequest, res: NextApiResponse) => { + return res.status(200).json([]) +}