mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: remove unused api github routes
This commit is contained in:
@@ -27,13 +27,13 @@ export const AddGithubProvider = () => {
|
|||||||
const url = document.location.origin;
|
const url = document.location.origin;
|
||||||
const manifest = JSON.stringify(
|
const manifest = JSON.stringify(
|
||||||
{
|
{
|
||||||
redirect_url: `${origin}/api/providers/github/redirect?authId=${data?.id}`,
|
redirect_url: `${origin}/api/providers/github/setup?authId=${data?.id}`,
|
||||||
name: `Dokploy-${format(new Date(), "yyyy-MM-dd")}`,
|
name: `Dokploy-${format(new Date(), "yyyy-MM-dd")}`,
|
||||||
url: origin,
|
url: origin,
|
||||||
hook_attributes: {
|
hook_attributes: {
|
||||||
url: `${url}/api/deploy/github`,
|
url: `${url}/api/deploy/github`,
|
||||||
},
|
},
|
||||||
callback_urls: [`${origin}/api/providers/github/redirect`],
|
callback_urls: [`${origin}/api/providers/github/setup`],
|
||||||
public: false,
|
public: false,
|
||||||
request_oauth_on_install: true,
|
request_oauth_on_install: true,
|
||||||
default_permissions: {
|
default_permissions: {
|
||||||
|
|||||||
@@ -22,6 +22,11 @@ export default async function handler(
|
|||||||
const signature = req.headers["x-hub-signature-256"];
|
const signature = req.headers["x-hub-signature-256"];
|
||||||
const github = req.body;
|
const github = req.body;
|
||||||
|
|
||||||
|
if(!github?.installation.id) {
|
||||||
|
res.status(400).json({ message: "Github Installation not found" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const githubResult = await db.query.githubProvider.findFirst({
|
const githubResult = await db.query.githubProvider.findFirst({
|
||||||
where: eq(githubProvider.githubInstallationId, github.installation.id),
|
where: eq(githubProvider.githubInstallationId, github.installation.id),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user