Accept 5-digit dienst numbers and normalize lookup type
This commit is contained in:
parent
bd8b5a5a66
commit
c97d662856
3 changed files with 4 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ const { increment: incrementDaily } = require('./dailyStats')
|
|||
const ALLOWED_GROUP = process.env.ALLOWED_GROUP
|
||||
|
||||
function extractDienstnummer(body) {
|
||||
const match = body.match(/^\s*(\d{4})\s*$/)
|
||||
const match = body.match(/^\s*(\d{4,5})\s*$/)
|
||||
return match ? match[1] : null
|
||||
}
|
||||
|
||||
|
|
@ -66,4 +66,4 @@ async function handleWebhook(payload) {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = { handleWebhook }
|
||||
module.exports = { handleWebhook, extractDienstnummer }
|
||||
|
|
|
|||
Loading…
Reference in a new issue