aktueller Stand lol
This commit is contained in:
@ -9,10 +9,12 @@ import tpl from "../tpl.mjs";
|
||||
|
||||
tpl.readdir("views");
|
||||
|
||||
//router.get(/^\/(audio\/?|image\/?|video\/?|user\/?)?(p\/\d+)?$/, async (req, res) => {
|
||||
router.get(/^\/(audio\/?|image\/?|video\/?)?(p\/\d+)?$/, async (req, res) => {
|
||||
try {
|
||||
let mime = false;
|
||||
let q = false;
|
||||
//if(req.url.split[0] == "user")
|
||||
if(['audio', 'image', 'video'].includes(req.url.split[0])) {
|
||||
mime = req.url.split[0];
|
||||
q = " where " + (mimes[mime] ? mimes[mime].map(_mime => `mime = "${_mime}"`).join(" or ") : null);
|
||||
@ -89,6 +91,9 @@ router.get(/^\/((audio\/|video\/|image\/)?[0-9]+)$/, async (req, res) => {
|
||||
const next = qnext[qnext.length - 1] ? qnext[qnext.length - 1].id : false;
|
||||
const prev = qprev[0] ? qprev[0].id : false;
|
||||
|
||||
for(let t = 0; t < tags.length; t++)
|
||||
tags[t].tag = tags[t].tag.replace(/[\u00A0-\u9999<>\&]/g, i => '&#'+i.charCodeAt(0)+';');
|
||||
|
||||
const data = {
|
||||
user: {
|
||||
name: query.username,
|
||||
|
Reference in New Issue
Block a user