mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: hardcoded gitlab.com to gitlabUrl
This commit is contained in:
@@ -7,13 +7,15 @@ export default async function handler(
|
|||||||
) {
|
) {
|
||||||
const { code, gitlabId } = req.query;
|
const { code, gitlabId } = req.query;
|
||||||
|
|
||||||
|
console.log("DEBUG: res.query: ", res);
|
||||||
|
|
||||||
if (!code || Array.isArray(code)) {
|
if (!code || Array.isArray(code)) {
|
||||||
return res.status(400).json({ error: "Missing or invalid code" });
|
return res.status(400).json({ error: "Missing or invalid code" });
|
||||||
}
|
}
|
||||||
|
|
||||||
const gitlab = await findGitlabById(gitlabId as string);
|
const gitlab = await findGitlabById(gitlabId as string);
|
||||||
|
|
||||||
const response = await fetch("https://gitlab.com/oauth/token", {
|
const response = await fetch(`${gitlab.gitlabUrl}/oauth/token`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
|
|||||||
Reference in New Issue
Block a user