mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
15 lines
No EOL
475 B
CoffeeScript
15 lines
No EOL
475 B
CoffeeScript
define [
|
|
"base"
|
|
], (App) ->
|
|
App.controller "GroupSubscriptionInviteController", ($scope, $http) ->
|
|
|
|
$scope.requestSent = false
|
|
|
|
$scope.joinGroup = ->
|
|
$scope.requestSent = true
|
|
request = $http.post "/user/subscription/#{subscription_id}/group/begin-join", {_csrf:window.csrfToken}
|
|
request.success (data, status)->
|
|
if status != 200 # assume request worked
|
|
$scope.requestSent = false
|
|
request.error (data, status)->
|
|
console.log "the request failed" |