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:
parent
42cede08e5
commit
fff2d74fe3
10 changed files with 418 additions and 36 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
11
src/site/pug/age_gated.pug
Normal file
11
src/site/pug/age_gated.pug
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
include includes/error.pug
|
||||
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
title= `Restricted profile | Bibliogram`
|
||||
include includes/head
|
||||
body.error-page
|
||||
+error(403, "Restricted profile", false)
|
||||
| This profile is age restricted.
|
||||
| You must log in to Instagram to view this profile.
|
||||
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
include includes/error.pug
|
||||
|
||||
- const numberFormat = new Intl.NumberFormat().format
|
||||
|
||||
doctype html
|
||||
html
|
||||
head
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue