Updated url meta data

This commit is contained in:
Jay 2022-02-19 18:48:31 -06:00
parent 3d8f981aad
commit c86aca3982
3 changed files with 28 additions and 10 deletions

View File

@ -3,7 +3,7 @@ const util = require('../util');
function auth(request, response, next) {
if(request.path.includes('/css/') || request.path.includes('/fonts/')
|| request.path.includes('/js/') || request.path.includes('/icons/') || request.path.includes('/banner/')) {
|| request.path.includes('/js/') || request.path.includes('/icons/') || request.path.includes('/banner/') || request.path.includes('/posts/')) {
if(request.subdomains.indexOf('juxt') !== -1) {
request.directory = 'web';
}

View File

@ -254,7 +254,6 @@ router.get('/token', upload.none(), async function (req, res) {
'X-Nintendo-Title-ID': req.headers['x-nintendo-title-id'],
'authorization': req.headers['authorization'],
}
console.log(headers);
request.get({
url: port + config.account_server_domain + "/v1/api/provider/service_token/@me",
headers: headers
@ -285,8 +284,6 @@ router.post('/login', upload.none(), async function (req, res) {
let user_id = req.body.user_id;
let user = await database.getUserByUsername(user_id);
let pnid = await database.getPNID(user.pid)
console.log(pnid)
console.log(user.pid)
let password = req.body.password;
if(password !== null && pnid !== null) {
if(pnid.access_level !== 3) {

View File

@ -12,18 +12,39 @@
gtag('js', new Date());
gtag('config', 'UA-195842548-1');
</script>
<meta content="<%= post.screen_name %>" property="og:title" />
<meta content="<%= post.body %>" property="og:description" />
<meta content="https://juxt.pretendo.cc/posts/<%= post.id %>" property="og:url" />
<meta content="#1F8A42" data-react-helmet="true" name="theme-color" />
<meta content="<%= community.name %> - <%= post.empathy_count%> Yeahs!" property="og:site_name">
<meta name="twitter:card" content="summary_large_image" />
<!-- Google / Search Engine Tags -->
<meta itemprop="name" content="Juxtaposition - Post by <%= post.screen_name %>">
<meta itemprop="description" content="<%= community.name %> - <%= post.empathy_count%> Yeahs!">
<% if(post.screenshot !== '') { %>
<meta itemprop="image" content="https://portal.cdn.pretendo.cc/screenshot/<%= post.id %>.png">
<%}%>
<% if(post.painting !== '') { %>
<meta itemprop="image" content="https://portal.cdn.pretendo.cc/drawing/<%= post.id %>.png">
<%}%>
<!-- Facebook Meta Tags -->
<meta property="og:url" content="https://juxt.pretendo.cc/posts/<%= post.id %>">
<meta property="og:type" content="website">
<meta property="og:title" content="Juxtaposition - Post by <%= post.screen_name %>">
<meta property="og:description" content="<%= community.name %> - <%= post.empathy_count%> Yeahs!">
<% if(post.screenshot !== '') { %>
<meta property="og:image" content="https://portal.cdn.pretendo.cc/screenshot/<%= post.id %>.png" />
<%}%>
<% if(post.painting !== '') { %>
<meta property="og:image" content="https://portal.cdn.pretendo.cc/drawing/<%= post.id %>.png" />
<%}%>
<!-- Twitter Meta Tags -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Juxtaposition - Post by <%= post.screen_name %>">
<meta name="twitter:description" content="<%= community.name %> - <%= post.empathy_count%> Yeahs!">
<% if(post.screenshot !== '') { %>
<meta property="twitter:image" content="https://portal.cdn.pretendo.cc/screenshot/<%= post.id %>.png" />
<%}%>
<% if(post.painting !== '') { %>
<meta property="twitter:image" content="https://portal.cdn.pretendo.cc/drawing/<%= post.id %>.png" />
<%}%>
</head>
<body>
<div id="main">