28 lines
815 B
JavaScript
28 lines
815 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const attendanceController = require('../controllers/attendanceController');
|
|
|
|
/**
|
|
* Attendance Routes
|
|
*/
|
|
|
|
// Get attendance logs with pagination
|
|
router.get('/logs', attendanceController.getAttendanceLogs);
|
|
|
|
// Create attendance log (QR scan)
|
|
router.post('/logs', attendanceController.createAttendanceLog);
|
|
|
|
// Get daily attendance summary
|
|
router.get('/daily', attendanceController.getDailyAttendance);
|
|
|
|
// Process daily attendance (aggregate from logs)
|
|
router.post('/process', attendanceController.processAttendance);
|
|
|
|
// Get attendance statistics
|
|
router.get('/stats', attendanceController.getAttendanceStats);
|
|
|
|
// Get attendance datatypes
|
|
router.get('/datatypes/schema', attendanceController.getAttendanceDatatypes);
|
|
|
|
module.exports = router;
|