EvalueTonSavoir/server/controllers/auth.js

25 lines
513 B
JavaScript
Raw Normal View History

2024-09-27 14:16:11 -04:00
const AuthConfig = require('../config/auth.js');
class authController {
async getActive(req, res, next) {
try {
2024-09-22 21:00:15 -04:00
2024-09-27 14:16:11 -04:00
const authC = new AuthConfig();
authC.loadConfig();
const authActive = authC.getActiveAuth();
2024-09-22 21:00:15 -04:00
const response = {
2024-09-24 22:00:28 -04:00
authActive
};
2024-09-22 21:00:15 -04:00
return res.json(response);
}
catch (error) {
2024-09-22 21:00:15 -04:00
return next(error); // Gérer l'erreur
}
}
}
module.exports = new authController;