mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
25dd998107
Squashed commits: [3a56af0] Remove cruft [c5a1f6c] Finalise alignment [82f741a] Working sessions page [d40f069] WIP: display sessions
20 lines
543 B
CoffeeScript
20 lines
543 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.controller "ClearSessionsController", ["$scope", "$http", ($scope, $http) ->
|
|
|
|
$scope.state =
|
|
otherSessions: window.otherSessions
|
|
error: false
|
|
success: false
|
|
|
|
$scope.clearSessions = () ->
|
|
console.log ">> clearing all sessions"
|
|
$http({method: 'POST', url: "/user/sessions/clear", headers: {'X-CSRF-Token': window.csrfToken}})
|
|
.success () ->
|
|
$scope.state.otherSessions = []
|
|
$scope.state.error = false
|
|
$scope.state.success = true
|
|
.error () ->
|
|
$scope.state.error = true
|
|
]
|