Skip to content

Commit fafee35

Browse files
chore: fix callback in routes
1 parent 430bc62 commit fafee35

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

routes/index.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,8 @@ const setupRoutes = (app) => {
156156
app.get("/api/login", login);
157157

158158
//callbacks
159-
if (process.env.NODE_ENV === "production") {
160-
app.post("/api/callback/github", handleOAuthCallback);
161-
} else if (process.env.NODE_ENV === "development") {
162-
app.get("/api/callback/github", handleOAuthCallback);
163-
}
164-
165-
if (process.env.NODE_ENV === "production") {
166-
app.post("/api/callback/gitlab", handleOAuthCallbackGitlab);
167-
} else if (process.env.NODE_ENV === "development") {
168-
app.get("/api/callback/gitlab", handleOAuthCallbackGitlab);
169-
}
159+
app.post("/api/callback/github", handleOAuthCallback);
160+
app.post("/api/callback/gitlab", handleOAuthCallbackGitlab);
170161

171162
app.get("/api/badgedRepos", badgedRepos);
172163
app.post("/api/repos-to-badge", reposToBadge);

0 commit comments

Comments
 (0)