mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-11-04 12:51:23 +00:00 
			
		
		
		
	DSS-5869 Adds Template: logout, Adds Route: logout
This commit is contained in:
		
							parent
							
								
									8115d4f2ab
								
							
						
					
					
						commit
						55e04ff115
					
				
							
								
								
									
										17
									
								
								wherehows-web/app/routes/logout.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								wherehows-web/app/routes/logout.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					import Ember from 'ember';
 | 
				
			||||||
 | 
					import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const {Route, inject: {service}} = Ember;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default Route.extend(AuthenticatedRouteMixin, {
 | 
				
			||||||
 | 
					  session: service(),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  actions: {
 | 
				
			||||||
 | 
					    didTransition() {
 | 
				
			||||||
 | 
					      Ember.$.get('/logout').then(() => {
 | 
				
			||||||
 | 
					      this.get('session').invalidate();
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
							
								
								
									
										1
									
								
								wherehows-web/app/templates/logout.hbs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								wherehows-web/app/templates/logout.hbs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					{{outlet}}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user