some stuff

This commit is contained in:
biglyderv 2024-11-15 10:22:45 -05:00
parent fee405b1b5
commit 62a5bb4c0c
3 changed files with 21 additions and 3 deletions

View file

@ -34,6 +34,21 @@ let main = new Route([auth], async function (req, res, input) {
content, content,
'false' 'false'
]); ]);
} else if (targetType == 'video') {
let v = await db.all('SELECT * FROM video WHERE id = ?', [
targetId
]);
if (v.length == 0) return;
await db.run('INSERT INTO message (username, targetType, targetId, date, content, read) VALUES (?,?,?,?,?,?)', [
v[0].username,
'video comment',
u,
+new Date(),
content,
'false'
]);
} }
res.send({ 'message': 'Comment sent', redirect: u }); res.send({ 'message': 'Comment sent', redirect: u });

View file

@ -10,10 +10,13 @@ const app = express();
const upload = multer({ dest: 'uploads/' }); const upload = multer({ dest: 'uploads/' });
app.use(cookieParser()); app.use(cookieParser());
app.use('/static', express.static('static')); app.use('/static', express.static('static'));
app.use('/videos', express.static('videos')); app.use('/videos', express.static('videos'));
app.use('/pfp', express.static('pfp')); app.use('/pfp', express.static('pfp'));
app.engine('.ejs', ejs.__express); app.engine('.ejs', ejs.__express);
app.set('views', './views'); app.set('views', './views');
app.set('view engine', 'ejs'); app.set('view engine', 'ejs');

View file

@ -2,15 +2,15 @@
<div class='banner'><img class='banner-background' src='/static/img/bg.svg'> <div class='banner'><img class='banner-background' src='/static/img/bg.svg'>
<div class='banner-content'> <div class='banner-content'>
<h1>BiglyChat</h1> <h1>BiglyChat</h1>
<p>BiglyChat is a niche community for broadcasting videos to your fanbase.</p> <p>BiglyChat is a niche community for broadcasting videos, playing games, and chatting with friends.</p>
<h2>Community</h2> <h2>Community</h2>
<%if (username=='!nobody' ) { %> <%if (username=='!nobody' ) { %>
<a class='form-button' href="/client/register">Join the Community</a> <a class='form-button' href="/client/register">Join the Community</a>
<br /> <br />
<% } %> <% } %>
<a class='form-button' href="/client/tou">Terms of Use</a> <a class='form-button' href="/client/tou">Terms of Use</a>
<a class='form-button' href="https://discord.gg/wZ3mg58JMT">Discord Server</a> <a class='form-button' href="https://dervland.net/">More Projects</a>
<a class='form-button' href="https://git.xuyezo.net/Zuxxied/bigly-chat">Developer Portal</a> <a class='form-button' href="https://git.dervlnd.net/core/bigly-chat">Developer Portal</a>
</div> </div>
</div> </div>
<h1 class='content-header'>Follow Feed</h1> <h1 class='content-header'>Follow Feed</h1>