From 506a381eca5e2bdc31d3529ecd3f1f7797551406 Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Tue, 14 Mar 2017 18:04:23 +0800 Subject: Add config option for gitlab api scope and auto adapt gitlab snippet feature on it --- app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'app.js') diff --git a/app.js b/app.js index c68652bb..722f0ead 100644 --- a/app.js +++ b/app.js @@ -335,8 +335,10 @@ if (config.github) { successReturnToOrRedirect: config.serverurl + '/', failureRedirect: config.serverurl + '/' })) - // github callback actions - app.get('/auth/github/callback/:noteId/:action', response.githubActions) + if (!config.gitlab.scope || config.gitlab.scope === 'api') { + // gitlab callback actions + app.get('/auth/gitlab/callback/:noteId/:action', response.gitlabActions) + } } // gitlab auth if (config.gitlab) { -- cgit v1.2.3