forked from dachan/dach
		
	removed root_post_id, added options to post
This commit is contained in:
		
							
								
								
									
										15
									
								
								src/index.js
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								src/index.js
									
									
									
									
									
								
							@@ -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("/");
 | 
			
		||||
    });
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user