You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
506 B
JavaScript

import VisitService from '../services/VisitService.js';
class VisitController {
async getAll(req, res, next) {
try {
const visits = await VisitService.getAll();
return res.json(visits);
} catch (e) {
next(e);
}
}
async update(req, res, next) {
try {
await VisitService.update();
return res.json('ok');
} catch (e) {
next(e);
}
}
}
export default new VisitController();