Skip to content

Commit

Permalink
add api to receive burgemeester benoemingen
Browse files Browse the repository at this point in the history
  • Loading branch information
karel kremer committed May 10, 2024
1 parent cfa167f commit c4d8623
Show file tree
Hide file tree
Showing 6 changed files with 679 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { app } from 'mu';
import { ErrorRequestHandler } from 'express';
import { mandatarissenRouter } from './routes/mandatarissen';
import express, { ErrorRequestHandler } from 'express';
import { handleBurgemeesterBenoeming } from './burgemeester-benoeming';

app.use(express.urlencoded({ extended: true }));

app.get('/', async (_req, res) => {
res.send({ status: 'ok' });
});

app.use('/mandatarissen', mandatarissenRouter);
handleBurgemeesterBenoeming(app);

const errorHandler: ErrorRequestHandler = function (err, _req, res, _next) {
// custom error handler to have a default 500 error code instead of 400 as in the template
Expand Down
Loading

0 comments on commit c4d8623

Please sign in to comment.