mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Move scripts related to account-merge checker to relevant modules
This commit is contained in:
parent
d0be98e89c
commit
fc0a4298f1
1 changed files with 0 additions and 29 deletions
|
@ -1,29 +0,0 @@
|
|||
define [
|
||||
"base"
|
||||
], (App) ->
|
||||
|
||||
# For account-merge-module
|
||||
App.controller "SharelatexAccountMergeCheckerController", ($scope, $http) ->
|
||||
$scope.hasOlAccount = null
|
||||
$scope.olEmail = ""
|
||||
$scope.errorCode = null
|
||||
$scope.success = null
|
||||
|
||||
$scope.submitEmail = () ->
|
||||
return if !$scope.olEmail
|
||||
data = {
|
||||
overleafEmail: $scope.olEmail
|
||||
_csrf: window.csrfToken
|
||||
}
|
||||
$scope.errorCode = null
|
||||
$http.post("/account-merge/email/overleaf", data)
|
||||
.then (resp) ->
|
||||
$scope.errorCode = null
|
||||
$scope.success = true
|
||||
.catch (resp) ->
|
||||
$scope.errorCode = resp?.data?.errorCode || 'default_error'
|
||||
$scope.success = false
|
||||
|
||||
# For integration-module
|
||||
App.controller "OverleafAccountMergeCheckerController", ($scope) ->
|
||||
$scope.hasOlAccount = null
|
Loading…
Reference in a new issue