some stuff
This commit is contained in:
parent
fee405b1b5
commit
62a5bb4c0c
3 changed files with 21 additions and 3 deletions
|
@ -34,6 +34,21 @@ let main = new Route([auth], async function (req, res, input) {
|
|||
content,
|
||||
'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 });
|
||||
|
|
3
index.js
3
index.js
|
@ -10,10 +10,13 @@ const app = express();
|
|||
const upload = multer({ dest: 'uploads/' });
|
||||
|
||||
app.use(cookieParser());
|
||||
|
||||
app.use('/static', express.static('static'));
|
||||
app.use('/videos', express.static('videos'));
|
||||
app.use('/pfp', express.static('pfp'));
|
||||
|
||||
app.engine('.ejs', ejs.__express);
|
||||
|
||||
app.set('views', './views');
|
||||
app.set('view engine', 'ejs');
|
||||
|
||||
|
|
|
@ -2,15 +2,15 @@
|
|||
<div class='banner'><img class='banner-background' src='/static/img/bg.svg'>
|
||||
<div class='banner-content'>
|
||||
<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>
|
||||
<%if (username=='!nobody' ) { %>
|
||||
<a class='form-button' href="/client/register">Join the Community</a>
|
||||
<br />
|
||||
<% } %>
|
||||
<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://git.xuyezo.net/Zuxxied/bigly-chat">Developer Portal</a>
|
||||
<a class='form-button' href="https://dervland.net/">More Projects</a>
|
||||
<a class='form-button' href="https://git.dervlnd.net/core/bigly-chat">Developer Portal</a>
|
||||
</div>
|
||||
</div>
|
||||
<h1 class='content-header'>Follow Feed</h1>
|
||||
|
|
Loading…
Reference in a new issue