colouring-montreal/app/src/api/controllers/editHistoryController.ts

21 lines
542 B
TypeScript
Raw Normal View History

import express from 'express';
import asyncController from "../routes/asyncController";
import * as editHistoryService from '../services/editHistory';
const getGlobalEditHistory = asyncController(async (req: express.Request, res: express.Response) => {
try {
const result = await editHistoryService.getGlobalEditHistory();
2019-11-14 10:28:12 -05:00
res.send({
history: result
});
} catch(error) {
console.error(error);
res.send({ error: 'Database error' });
}
});
export {
getGlobalEditHistory
};