1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-04-14 07:44:30 +00:00

Remove unused socket.io endpoints

This commit is contained in:
James Allen 2014-11-06 11:16:24 +00:00
parent 1a2411d4c2
commit 94a17bd36d

View file

@ -254,13 +254,6 @@ module.exports = class Router
metrics.inc ('socket-io.disconnect')
EditorController.leaveProject client, user
client.on 'reportError', (error, callback) ->
EditorController.reportError client, error, callback
client.on 'sendUpdate', (doc_id, windowName, change)->
AuthorizationManager.ensureClientCanEditProject client, (error, project_id) =>
EditorUpdatesController.applyAceUpdate(client, project_id, doc_id, windowName, change)
client.on 'applyOtUpdate', (doc_id, update) ->
AuthorizationManager.ensureClientCanEditProject client, (error, project_id) =>
EditorUpdatesController.applyOtUpdate(client, project_id, doc_id, update)
@ -269,14 +262,6 @@ module.exports = class Router
AuthorizationManager.ensureClientCanViewProject client, (error, project_id) =>
EditorController.updateClientPosition(client, cursorData)
client.on 'addUserToProject', (email, newPrivalageLevel, callback)->
AuthorizationManager.ensureClientCanAdminProject client, (error, project_id) =>
EditorController.addUserToProject project_id, email, newPrivalageLevel, callback
client.on 'removeUserFromProject', (user_id, callback)->
AuthorizationManager.ensureClientCanAdminProject client, (error, project_id) =>
EditorController.removeUserFromProject(project_id, user_id, callback)
client.on 'leaveDoc', (doc_id, callback)->
AuthorizationManager.ensureClientCanViewProject client, (error, project_id) =>
EditorController.leaveDoc(client, project_id, doc_id, callback)
@ -285,19 +270,14 @@ module.exports = class Router
AuthorizationManager.ensureClientCanViewProject client, (error, project_id) =>
EditorController.joinDoc(client, project_id, args...)
# Deprecated and can be removed after deploying.
client.on 'pdfProject', (opts, callback)->
AuthorizationManager.ensureClientCanViewProject client, (error, project_id) =>
CompileManager.compile project_id, user._id, opts, (error, status, outputFiles) ->
return callback error, status == "success", outputFiles
client.on 'getRootDocumentsList', (callback)->
AuthorizationManager.ensureClientCanEditProject client, (error, project_id) =>
EditorController.getListOfDocPaths project_id, callback
client.on 'forceResyncOfDropbox', (callback)->
# The remaining can be done via HTTP
client.on 'addUserToProject', (email, newPrivalageLevel, callback)->
AuthorizationManager.ensureClientCanAdminProject client, (error, project_id) =>
EditorController.forceResyncOfDropbox project_id, callback
EditorController.addUserToProject project_id, email, newPrivalageLevel, callback
client.on 'removeUserFromProject', (user_id, callback)->
AuthorizationManager.ensureClientCanAdminProject client, (error, project_id) =>
EditorController.removeUserFromProject(project_id, user_id, callback)
client.on 'getUserDropboxLinkStatus', (owner_id, callback)->
AuthorizationManager.ensureClientCanAdminProject client, (error, project_id) =>