overleaf/services/web/public/coffee/main/subscription/group-subscription-invite-controller.coffee

14 lines
430 B
CoffeeScript
Raw Normal View History

define [
"base"
], (App) ->
App.controller "GroupSubscriptionInviteController", ($scope, $http) ->
$scope.requestSent = false
$scope.joinGroup = ->
console.log "joingin group"
request = $http.post "/user/subscription/#{subscription_id}/group/begin-join", {_csrf:window.csrfToken}
request.success (data, status)->
$scope.requestSent = true
request.error (data, status)->
console.log "the request failed"