Database Backend
This commit is contained in:
		
							parent
							
								
									4a183c0c89
								
							
						
					
					
						commit
						115fb1d38d
					
				
					 2 changed files with 29 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -41,8 +41,15 @@ class API:
 | 
			
		|||
        @self.app.route('/interstellar/api/db', methods=['POST'])
 | 
			
		||||
        def db_manipulate():
 | 
			
		||||
            action = request.args.get('action')
 | 
			
		||||
            data = request.args.get('data')
 | 
			
		||||
            if action == "create_account":
 | 
			
		||||
                print("ahh")
 | 
			
		||||
                self.db.add_user(data)
 | 
			
		||||
            if action == "change_password":
 | 
			
		||||
                self.db.update_password(data)
 | 
			
		||||
            if action == "get_data":
 | 
			
		||||
                self.db.get_additional_info(data)
 | 
			
		||||
            if action == "check_credentials":
 | 
			
		||||
                self.db.check_credentials(data)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        ssl_context = ('cert.pem', 'key.pem')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue