Add database password rotation to view
This commit is contained in:
parent
f6ee885f26
commit
48c39abfcb
11 changed files with 178 additions and 6 deletions
10
resources/scripts/api/server/rotateDatabasePassword.ts
Normal file
10
resources/scripts/api/server/rotateDatabasePassword.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
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);
|
||||
});
|
||||
};
|
Reference in a new issue