Skip to content

Commit

Permalink
fix: also remove trailing slashes on service suffix and endpoint urls
Browse files Browse the repository at this point in the history
  • Loading branch information
liquiddevelopmentnet committed Dec 26, 2023
1 parent f728ab6 commit 373f1bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/service/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ export class Service {
const endpoint = this._p_props.endpoints[name]
const pre_url =
removeTrailingSlashes(this._g_props?.url ?? '') +
(addLeadingSlash(this._p_props.suffix) ?? '') +
(addLeadingSlash(endpoint.url) ?? '')
(addLeadingSlash(removeTrailingSlashes(this._p_props.suffix)) ?? '') +
(addLeadingSlash(removeTrailingSlashes(endpoint.url)) ?? '')

this[name as keyof Service] = async (...args: object[]) => {
const url = endpoint.params
Expand Down

0 comments on commit 373f1bc

Please sign in to comment.