mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 15:36:52 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			11 lines
		
	
	
		
			465 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
		
			465 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { rawDataToServerDatabase, ServerDatabase } from '@/api/server/getServerDatabases';
 | 
						|
import http from '@/api/http';
 | 
						|
 | 
						|
export default (uuid: string, database: string): Promise<ServerDatabase> => {
 | 
						|
    return new Promise((resolve, reject) => {
 | 
						|
        http.post(`/api/client/servers/${uuid}/databases/${database}/rotate-password`)
 | 
						|
            .then((response) => resolve(rawDataToServerDatabase(response.data.attributes)))
 | 
						|
            .catch(reject);
 | 
						|
    });
 | 
						|
};
 |