Fix opengraph tags. Fixes #36

This commit is contained in:
Dessalines 2020-09-23 13:46:50 -05:00
parent b8fdc5b594
commit f9c0c72bb9

View file

@ -43,7 +43,9 @@ server.get('/*', async (req, res) => {
let site: GetSiteResponse = resolver[0]; let site: GetSiteResponse = resolver[0];
let routeData = resolver.slice(1, resolver.length); let routeData = resolver.slice(1, resolver.length);
let acceptLang = req.headers['accept-language'].split(',')[0]; let acceptLang = req.headers['accept-language']
? req.headers['accept-language'].split(',')[0]
: 'en';
let lang = !!site.my_user let lang = !!site.my_user
? site.my_user.lang == 'browser' ? site.my_user.lang == 'browser'
? acceptLang ? acceptLang