2019-11-14 07:56:03 -05:00
|
|
|
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
|
|
|
|
});
|
2019-11-14 07:56:03 -05:00
|
|
|
} catch(error) {
|
|
|
|
console.error(error);
|
|
|
|
res.send({ error: 'Database error' });
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
export {
|
|
|
|
getGlobalEditHistory
|
|
|
|
};
|