diff --git a/services/web/app/coffee/Features/StaticPages/HomeController.coffee b/services/web/app/coffee/Features/StaticPages/HomeController.coffee index 3a284c2f3a..c079c407cd 100755 --- a/services/web/app/coffee/Features/StaticPages/HomeController.coffee +++ b/services/web/app/coffee/Features/StaticPages/HomeController.coffee @@ -1,6 +1,5 @@ logger = require('logger-sharelatex') _ = require('underscore') -User = require('../../controllers/UserController') Quotes = require('../../models/Quote').Quote Path = require "path" diff --git a/services/web/app/coffee/controllers/UserController.coffee b/services/web/app/coffee/controllers/UserController.coffee deleted file mode 100644 index e1a9be4460..0000000000 --- a/services/web/app/coffee/controllers/UserController.coffee +++ /dev/null @@ -1,30 +0,0 @@ -User = require('../models/User').User -sanitize = require('sanitizer') -fs = require('fs') -_ = require('underscore') -logger = require('logger-sharelatex') -Security = require('../managers/SecurityManager') -Settings = require('settings-sharelatex') -dropboxHandler = require('../Features/Dropbox/DropboxHandler') -userRegistrationHandler = require('../Features/User/UserRegistrationHandler') -metrics = require('../infrastructure/Metrics') -ReferalAllocator = require('../Features/Referal/ReferalAllocator') -AuthenticationManager = require("../Features/Authentication/AuthenticationManager") -AuthenticationController = require("../Features/Authentication/AuthenticationController") -SubscriptionLocator = require("../Features/Subscription/SubscriptionLocator") -UserDeleter = require("../Features/User/UserDeleter") -EmailHandler = require("../Features/Email/EmailHandler") - - -module.exports = {} - - - - - - - - - - - diff --git a/services/web/app/coffee/router.coffee b/services/web/app/coffee/router.coffee index 3c683b6fe2..ad61b4ce94 100644 --- a/services/web/app/coffee/router.coffee +++ b/services/web/app/coffee/router.coffee @@ -1,4 +1,3 @@ -UserController = require('./controllers/UserController') AdminController = require('./Features/ServerAdmin/AdminController') HomeController = require('./Features/StaticPages/HomeController') ProjectController = require("./Features/Project/ProjectController") @@ -24,7 +23,7 @@ AuthenticationController = require('./Features/Authentication/AuthenticationCont TagsController = require("./Features/Tags/TagsController") CollaboratorsController = require('./Features/Collaborators/CollaboratorsController') UserInfoController = require('./Features/User/UserInfoController') -UserController_new = require("./Features/User/UserController") +UserController = require("./Features/User/UserController") UserPagesController = require('./Features/User/UserPagesController') DocumentController = require('./Features/Documents/DocumentController') CompileManager = require("./Features/Compile/CompileManager") @@ -51,7 +50,7 @@ module.exports = class Router app.get '/login', UserPagesController.loginPage app.post '/login', AuthenticationController.login - app.get '/logout', UserController_new.logout + app.get '/logout', UserController.logout app.get '/restricted', SecurityManager.restricted app.get '/resources', HomeController.externalPage("resources", "LaTeX Resources") @@ -67,7 +66,7 @@ module.exports = class Router app.get '/dropbox', InfoController.dropbox app.get '/register', UserPagesController.registerPage - app.post '/register', UserController_new.register + app.post '/register', UserController.register SubscriptionRouter.apply(app) UploadsRouter.apply(app) @@ -76,12 +75,12 @@ module.exports = class Router app.get '/user/bonus', AuthenticationController.requireLogin(), ReferalMiddleware.getUserReferalId, ReferalController.bonus app.get '/user/settings', AuthenticationController.requireLogin(), UserPagesController.settingsPage - app.post '/user/settings', AuthenticationController.requireLogin(), UserController_new.updateUserSettings - app.post '/user/password/update', AuthenticationController.requireLogin(), UserController_new.changePassword + app.post '/user/settings', AuthenticationController.requireLogin(), UserController.updateUserSettings + app.post '/user/password/update', AuthenticationController.requireLogin(), UserController.changePassword app.get '/user/passwordreset', UserPagesController.passwordResetPage - app.post '/user/passwordReset', UserController_new.doRequestPasswordReset - app.del '/user/newsletter/unsubscribe', AuthenticationController.requireLogin(), UserController_new.unsubscribe - app.del '/user', AuthenticationController.requireLogin(), UserController_new.deleteUser + app.post '/user/passwordReset', UserController.doRequestPasswordReset + app.del '/user/newsletter/unsubscribe', AuthenticationController.requireLogin(), UserController.unsubscribe + app.del '/user', AuthenticationController.requireLogin(), UserController.deleteUser app.get '/dropbox/beginAuth', DropboxUserController.redirectUserToDropboxAuth app.get '/dropbox/completeRegistration', DropboxUserController.completeDropboxRegistration