I swear, I'm going to start doing regular commits
+ Added a ton of shit + About to add socket.io oh god.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
let express = require('express')
|
||||
|
||||
var multer = require('multer')
|
||||
var upload = multer({ dest: '../staticFiles/' })
|
||||
var upload = multer({ dest: '../staticFiles/' }) //@TODO make this a global value
|
||||
let router = express.Router()
|
||||
|
||||
let Attachment = require('@models/Attachment');
|
||||
|
@@ -38,6 +38,15 @@ router.post('/search', function (req, res) {
|
||||
.then( notesAndTags => res.send(notesAndTags))
|
||||
})
|
||||
|
||||
router.post('/difftext', function (req, res) {
|
||||
|
||||
Notes.getDiffText(userId, req.body.noteId, req.body.text, req.body.updated)
|
||||
.then( fullDiffText => {
|
||||
//Response should be full diff text
|
||||
res.send(fullDiffText)
|
||||
})
|
||||
})
|
||||
|
||||
//Reindex all notes. Not a very good function, not public
|
||||
router.get('/reindex5yu43prchuj903mrc', function (req, res) {
|
||||
|
||||
|
@@ -42,4 +42,10 @@ router.post('/get', function (req, res) {
|
||||
.then( data => res.send(data) )
|
||||
})
|
||||
|
||||
//Get all the tags for this user in order of usage
|
||||
router.post('/usertags', function (req, res) {
|
||||
Tags.userTags(userId)
|
||||
.then( data => res.send(data) )
|
||||
})
|
||||
|
||||
module.exports = router
|
Reference in New Issue
Block a user