diff --git a/src/main/client/app/pages/credentials/credentials-list.vue b/src/main/client/app/pages/credentials/credentials-list.vue index aeddb9c78..dd296b3a5 100644 --- a/src/main/client/app/pages/credentials/credentials-list.vue +++ b/src/main/client/app/pages/credentials/credentials-list.vue @@ -28,6 +28,13 @@ > + + + @@ -35,9 +42,10 @@ @@ -66,4 +92,10 @@ .card-title { margin: 0; } + + .card-footer { + display: flex; + justify-content: space-between; + + } diff --git a/src/main/client/app/shared/api/credentials-api.js b/src/main/client/app/shared/api/credentials-api.js index 6512154b3..7f81d7c34 100644 --- a/src/main/client/app/shared/api/credentials-api.js +++ b/src/main/client/app/shared/api/credentials-api.js @@ -7,3 +7,5 @@ export const getCredentials = async (credentialsId) => axios.get(`/api/credentia export const updateCredentials = async (credentials) => axios.put(`/api/credentials/${credentials.id}`, credentials); export const createCredentials = async (credentials) => axios.post('/api/credentials', credentials); + +export const deleteCredentials = async (credentials) => axios.delete(`/api/credentials/${credentials.id}`); diff --git a/src/main/java/io/gaia_app/credentials/CredentialsRestController.java b/src/main/java/io/gaia_app/credentials/CredentialsRestController.java index d3d6e8d7f..fad4670e0 100644 --- a/src/main/java/io/gaia_app/credentials/CredentialsRestController.java +++ b/src/main/java/io/gaia_app/credentials/CredentialsRestController.java @@ -35,4 +35,9 @@ public Credentials createCredentials(@RequestBody Credentials credentials){ public Credentials updateCredentials(@RequestBody Credentials credentials, @PathVariable String id){ return this.credentialsRepository.save(credentials); } + + @DeleteMapping("/{id}") + public void deleteCredentials(@PathVariable String id){ + this.credentialsRepository.deleteById(id); + } }