1
0
Fork 0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-03-01 18:31:35 +00:00

Provide error page for age gated profiles

This commit is contained in:
Cadence Ember 2020-04-14 03:46:23 +12:00
parent 42cede08e5
commit fff2d74fe3
No known key found for this signature in database
GPG key ID: 128B99B1B74A6412
10 changed files with 418 additions and 36 deletions

View file

@ -47,6 +47,8 @@ module.exports = [
expiresMinutes: userRequestCache.getTtl("user/"+fill[0], 1000*60)
})
}
} else if (error === constants.symbols.extractor_results.AGE_RESTRICTED) {
return render(403, "pug/age_gated.pug")
} else {
throw error
}

View file

@ -89,6 +89,8 @@ module.exports = [
expiresMinutes: userRequestCache.getTtl("user/"+fill[0], 1000*60)
})
}
} else if (error === constants.symbols.extractor_results.AGE_RESTRICTED) {
return render(403, "pug/age_gated.pug")
} else {
throw error
}