Skip to content

Commit

Permalink
fix: user storage url construction bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuartu committed Sep 13, 2024
1 parent 367cb1d commit 9edcf0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const getMockUserStorageEndpoint = (
return `${USER_STORAGE_ENDPOINT}/${path}`;
}

return `${USER_STORAGE_ENDPOINT}${createEntryPath(
return `${USER_STORAGE_ENDPOINT}/${createEntryPath(
path as UserStoragePathWithFeatureAndKey,
MOCK_STORAGE_KEY,
)}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function getUserStorage(
const { bearerToken, path, storageKey, nativeScryptCrypto } = opts;

const encryptedPath = createEntryPath(path, storageKey);
const url = new URL(`${USER_STORAGE_ENDPOINT}${encryptedPath}`);
const url = new URL(`${USER_STORAGE_ENDPOINT}/${encryptedPath}`);

const userStorageResponse = await fetch(url.toString(), {
headers: {
Expand Down Expand Up @@ -172,7 +172,7 @@ export async function upsertUserStorage(
nativeScryptCrypto,
);
const encryptedPath = createEntryPath(path, storageKey);
const url = new URL(`${USER_STORAGE_ENDPOINT}${encryptedPath}`);
const url = new URL(`${USER_STORAGE_ENDPOINT}/${encryptedPath}`);

const res = await fetch(url.toString(), {
method: 'PUT',
Expand Down

0 comments on commit 9edcf0e

Please sign in to comment.