EvalueTonSavoir/server/controllers/auth.js

24 lines
443 B
JavaScript
Raw Normal View History

const authConfig = require('../config/auth.js');
class authController {
async getActive(req, res, next) {
2024-09-22 21:00:15 -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 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;