mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-23 06:45:27 +02:00
feat: GitHub and GitLab provider integration with user association
- Added userId to the GitHub and GitLab provider setup to associate providers with the user who created them. - Updated redirect URL in GitHub provider to include userId for better tracking. - Modified API handlers and service functions to accommodate userId in provider creation and validation.
This commit is contained in:
@@ -10,13 +10,14 @@ type Query = {
|
||||
state: string;
|
||||
installation_id: string;
|
||||
setup_action: string;
|
||||
userId: string;
|
||||
};
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse,
|
||||
) {
|
||||
const { code, state, installation_id }: Query = req.query as Query;
|
||||
const { code, state, installation_id, userId }: Query = req.query as Query;
|
||||
|
||||
if (!code) {
|
||||
return res.status(400).json({ error: "Missing code parameter" });
|
||||
@@ -44,6 +45,7 @@ export default async function handler(
|
||||
githubPrivateKey: data.pem,
|
||||
},
|
||||
value as string,
|
||||
userId,
|
||||
);
|
||||
} else if (action === "gh_setup") {
|
||||
await db
|
||||
|
||||
Reference in New Issue
Block a user