Version 0.7.4 - Ajout de la vérification du CLP
This commit is contained in:
		@@ -76,8 +76,12 @@ module.exports.getDiscordUser = function (code, session) {
 | 
			
		||||
                }).then(resp2 => resp2.json()).then(userInfo => {
 | 
			
		||||
 | 
			
		||||
                    var user = {}
 | 
			
		||||
 
 | 
			
		||||
                    if(typeof userInfo.user == "undefined") {
 | 
			
		||||
 | 
			
		||||
                    if(typeof userInfo.joined_at == "undefined") {
 | 
			
		||||
 | 
			
		||||
                        reject("NOT_IN_CLP")
 | 
			
		||||
 | 
			
		||||
                    } else if(typeof userInfo.user == "undefined") {
 | 
			
		||||
                        reject("MIGRATE_ACCOUNT_ONLY")
 | 
			
		||||
 | 
			
		||||
                    } else {
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,11 @@ router.get('/redirect', function(req, res, next) {
 | 
			
		||||
 | 
			
		||||
                        res.redirect('/login?error=NOT_IN_BETA')
 | 
			
		||||
                        
 | 
			
		||||
                    } else {
 | 
			
		||||
                    } else if(error == "NOT_IN_CLP") {
 | 
			
		||||
 | 
			
		||||
                        res.redirect('/login?error=NOT_IN_CLP')
 | 
			
		||||
                        
 | 
			
		||||
                     } else {
 | 
			
		||||
 | 
			
		||||
                        res.redirect('/login?error=CANCEL_LOGIN')
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,7 @@ router.get('/', function(req, res, next) {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if(req.query.error == "IS_NOT_IN_CLP") {
 | 
			
		||||
        if(req.query.error == "NOT_IN_CLP") {
 | 
			
		||||
 | 
			
		||||
            error = "<p style='color:red; margin-bottom: 0.5vw !important;'>Que fais-tu là ? Seul les membres du CLP peuvent contrôler le Bot</p>"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user