Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

fix: uri encoding #47

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ object CredentialsService {
} ?: let {
CredentialsRepository.insert(
DbCredential(
credentialId = URLEncoder.encode(credentialId, "UTF-8"),
credentialId = credentialId,
document = document,
)
)
Expand Down
4 changes: 2 additions & 2 deletions web/src/pages/credentials/[credentialId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,13 @@ const {
pending,
refresh,
error,
} = await useLazyFetch(`/r/wallet/credentials/${credentialId}`);
} = await useLazyFetch(`/r/wallet/credentials/${encodeURIComponent(credentialId)}`);
refreshNuxtData();

useHead({title: "View credential - walt.id"});

async function deleteCredential() {
await $fetch(`/r/wallet/credentials/${credentialId}`, {
await $fetch(`/r/wallet/credentials/${encodeURIComponent(credentialId)}`, {
method: "DELETE",
});
await navigateTo({path: "/"});
Expand Down
2 changes: 1 addition & 1 deletion web/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<ul class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 mt-6" role="list">
<li v-for="credential in credentials" :key="credential.id"
class="col-span-1 divide-y divide-gray-200 rounded-lg bg-white shadow w-[96%] transform hover:scale-105 cursor-pointer duration-200">
<NuxtLink :to="'/credentials/' + credential.id">
<NuxtLink :to="'/credentials/' + encodeURIComponent(credential.id)">
<div class="bg-white p-6 rounded-2xl shadow-2xl h-full">
<div class="flex justify-end">
<div
Expand Down
Loading