Add real-time collab controller for markdown
This commit is contained in:
parent
83ac17cbac
commit
412c791b02
10
app/controllers/socket/Markdown.controller.js
Normal file
10
app/controllers/socket/Markdown.controller.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
const EditorController = require('./Editor.controller')
|
||||||
|
|
||||||
|
class MarkdownController extends EditorController {
|
||||||
|
async _get_resource(id) {
|
||||||
|
const Node = this.models.get('api:Node')
|
||||||
|
return Node.findOne({ UUID: id })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = exports = MarkdownController
|
@ -16,5 +16,8 @@ module.exports = exports = {
|
|||||||
'/code/.websocket': [
|
'/code/.websocket': [
|
||||||
'controller::socket:Code',
|
'controller::socket:Code',
|
||||||
],
|
],
|
||||||
|
'/markdown/.websocket': [
|
||||||
|
'controller::socket:Markdown',
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user