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