diff --git a/backend/src/app.ts b/backend/src/app.ts index 4c8091f..e519272 100644 --- a/backend/src/app.ts +++ b/backend/src/app.ts @@ -143,6 +143,10 @@ app.use(route.post('/invoice', async (ctx) => { ctx.status = 204 })) +app.use(route.get('/invoice/INV-:date(\\d{8})-:suffix(\\d+)', async (ctx, invoiceId, suffix) => { + ctx.body = `Invoice ID: INV-${invoiceId}-${suffix}` +})) + const port = parseInt(process.env.PORT ?? '3000') app.listen(port, () => { console.log(`Server is running at http://localhost:${port}`)