add delete account functionality (*sigh*, y'all asked for it)

This commit is contained in:
Tyler Renelle
2013-03-15 17:58:37 -04:00
parent 7a7c96ca57
commit 368748b67a
2 changed files with 16 additions and 0 deletions
+4
View File
@@ -92,6 +92,10 @@ module.exports.app = (appExports, model) ->
appExports.toggleHeader = (e, el) ->
user.set 'preferences.hideHeader', !user.get('preferences.hideHeader')
appExports.deleteAccount = (e, el) ->
model.del "users.#{user.get('id')}", ->
window.location.href = "/logout"
user.on 'set', 'flags.customizationsNotification', (captures, args) ->
return unless captures == true
$('.main-avatar').popover('destroy') #remove previous popovers