Cleanup tasks
This commit is contained in:
parent
397a98ffd4
commit
180ae1f444
6 changed files with 156 additions and 1 deletions
|
|
@ -14,6 +14,9 @@ const createPerson = require('./routes/createPerson');
|
|||
const login = require('./routes/login');
|
||||
const updatePerson = require('./routes/updatePerson');
|
||||
|
||||
const taskCleanup = require('./routes/taskCleanup');
|
||||
const taskLegacyCleanup = require('./routes/taskLegacyCleanup');
|
||||
|
||||
const app = express();
|
||||
const port = 8080;
|
||||
const corsOptions = {
|
||||
|
|
@ -47,6 +50,10 @@ app.post('/event/:eventId/people', createPerson);
|
|||
app.post('/event/:eventId/people/:personName', login);
|
||||
app.patch('/event/:eventId/people/:personName', updatePerson);
|
||||
|
||||
// Tasks
|
||||
app.get('/tasks/cleanup', taskCleanup);
|
||||
app.get('/tasks/legacyCleanup', taskLegacyCleanup);
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Crabfit API listening at http://localhost:${port} in ${process.env.NODE_ENV === 'production' ? 'prod' : 'dev'} mode`)
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue