mirror of
https://github.com/lukevella/rallly.git
synced 2025-05-02 11:46:03 +02:00
- added notifications - added toggle switches - added delete feature - added email verification
18 lines
695 B
JavaScript
18 lines
695 B
JavaScript
angular.module('rallly')
|
|
.controller('DeletionCtrl', function($state, Notification, Event){
|
|
Event.destroy({id : $state.params.id, code :$state.params.code}, function(){
|
|
var notification = new Notification({
|
|
title : 'Event deleted',
|
|
message : 'This event has been deleted',
|
|
type : 'success',
|
|
timeout : 5000
|
|
});
|
|
}, function(e){
|
|
var notification = new Notification({
|
|
title : 'Deletion Failed',
|
|
message : 'The event could not be deleted. Make sure that it exists and that the url is correct',
|
|
type : 'error'
|
|
});
|
|
});
|
|
$state.go('event', { id : $state.params.id });
|
|
});
|