Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#IOCOM-681] fixed query param decode in get third party attachments url #1074

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions src/adapters/pnFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import { PN_SERVICE_ID } from "../config";

const getPath = (input: RequestInfo | URL): string =>
input instanceof URL
? `${input.pathname}${input.searchParams}`
? `${input.pathname}${input.search}`
: typeof input === "string"
? `${new URL(input).pathname}${new URL(input).searchParams}`
: `${new URL(input.url).pathname}${new URL(input.url).searchParams}`;
? `${new URL(input).pathname}${new URL(input).search}`
: `${new URL(input.url).pathname}${new URL(input.url).search}`;

export const ThirdPartyMessagesUrl = pathParamsFromUrl(
RegExp("^[/]+messages[/]+([^/]+)$"),
Expand Down Expand Up @@ -434,7 +434,7 @@ export const redirectAttachment =
.otherwise((au) =>
TE.left(
new Error(
`Can not find a Piattaforma Notifiche get attachment implementation for ${au}`
`Can not distinguisce a PnDocumentUrl from a PnPaymentUrl with the url ${au}`
acuiuli marked this conversation as resolved.
Show resolved Hide resolved
)
)
)
Expand Down Expand Up @@ -534,7 +534,7 @@ export const pnFetch =
pipe(
TE.left(
new Error(
`Can not find a Piattaforma Notifiche implementation for ${url}`
`[pnFetch] Can not find a Piattaforma Notifiche implementation for ${url}`
)
),
TE.mapLeft(errorResponse),
Expand Down