|
|
@@ -982,19 +982,19 @@ module.exports = function(crowi, app) {
|
|
|
const config = await crowi.getConfig();
|
|
|
|
|
|
|
|
|
- // // reset strategy
|
|
|
- // await crowi.passportService.resetTwitterStrategy();
|
|
|
- // // setup strategy
|
|
|
- // if (Config.isEnabledPassportTwitter(config)) {
|
|
|
- // try {
|
|
|
- // await crowi.passportService.setupTwitterStrategy(true);
|
|
|
- // }
|
|
|
- // catch (err) {
|
|
|
- // // reset
|
|
|
- // await crowi.passportService.resetTwitterStrategy();
|
|
|
- // return res.json({status: false, message: err.message});
|
|
|
- // }
|
|
|
- // }
|
|
|
+ // reset strategy
|
|
|
+ await crowi.passportService.resetTwitterStrategy();
|
|
|
+ // setup strategy
|
|
|
+ if (Config.isEnabledPassportTwitter(config)) {
|
|
|
+ try {
|
|
|
+ await crowi.passportService.setupTwitterStrategy(true);
|
|
|
+ }
|
|
|
+ catch (err) {
|
|
|
+ // reset
|
|
|
+ await crowi.passportService.resetTwitterStrategy();
|
|
|
+ return res.json({status: false, message: err.message});
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
return res.json({status: true});
|
|
|
};
|