mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 15:49:01 +02:00
moved delete project inside the editor to the http endpoint
This commit is contained in:
@@ -293,10 +293,6 @@ module.exports = class Router
|
||||
AuthorizationManager.ensureClientCanEditProject client, (error, project_id) =>
|
||||
EditorController.setRootDoc(project_id, newRootDocID, callback)
|
||||
|
||||
client.on 'deleteProject', (callback)->
|
||||
AuthorizationManager.ensureClientCanAdminProject client, (error, project_id) =>
|
||||
EditorController.deleteProject(project_id, callback)
|
||||
|
||||
client.on 'setPublicAccessLevel', (newAccessLevel, callback)->
|
||||
AuthorizationManager.ensureClientCanAdminProject client, (error, project_id) =>
|
||||
EditorController.setPublicAccessLevel(project_id, newAccessLevel, callback)
|
||||
|
||||
@@ -38,9 +38,14 @@ define [
|
||||
$("#deleteProject").click (event)=>
|
||||
event.preventDefault()
|
||||
self = @
|
||||
deleteProject = ->
|
||||
self.ide.socket.emit 'deleteProject', ->
|
||||
window.location = '/'
|
||||
deleteProject = =>
|
||||
$.ajax
|
||||
url: "/Project/#{@ide.project_id}",
|
||||
type: 'DELETE'
|
||||
data:
|
||||
_csrf: window.csrfToken
|
||||
success: ->
|
||||
window.location = '/'
|
||||
modalOptions =
|
||||
templateId:'deleteEntityModal'
|
||||
isStatic: false
|
||||
|
||||
Reference in New Issue
Block a user