removed root_post_id, added options to post

This commit is contained in:
leca 2023-11-03 21:11:45 +03:00
parent 5a229b3f13
commit 07e5c1b945
1 changed files with 14 additions and 1 deletions

View File

@ -5,6 +5,7 @@ const dotenv = require('dotenv');
const MemoryStore = require('memorystore')(session);
const fs = require('fs');
const bcrypt = require('bcryptjs');
const fileupload = require('express-fileupload');
const app = express();
@ -65,6 +66,18 @@ app.get('/', (req, res) => {
res.render('index');
});
app.post('/api/uploadMedia', async (req, res) => {
});
app.post('/api/post', async (req, res) => {
const { content, } = req.body;
});
app.post('/api/createThread', async (req, res) => {
const { threadName, isLocked, isPinned } = req.body;
});
app.get('/api/getBoards', async (req, res) => {
let queryRes = await db.query('SELECT * FROM boards');
@ -91,7 +104,7 @@ app.post('/api/login', async (req, res) => {
currentSession.token = token;
console.log(token);
}
res.redirect("/index");
res.redirect("/");
});
});