File tree 1 file changed +10
-4
lines changed 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,10 @@ export async function getFeedPostsByUrl(
147
147
) ;
148
148
}
149
149
150
+ function concatURI ( base : string , path : string ) : string {
151
+ return `${ base } /${ path } ` ;
152
+ }
153
+
150
154
/** Fetch content from remote.
151
155
*
152
156
* Platform must support [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) to use this function.
@@ -167,10 +171,12 @@ export async function fetchContent(
167
171
} = { } ,
168
172
) : Fork < NotFoundError , Response > {
169
173
const url = new URL (
170
- `feeds/${ encodeURIComponent (
171
- feedUrlBlake3Base64 ,
172
- ) } /posts/${ encodeURIComponent ( postIdBlake3Base64 ) } /content`,
173
- client . endpointBase ,
174
+ concatURI (
175
+ client . endpointBase ,
176
+ `feeds/${ encodeURIComponent (
177
+ feedUrlBlake3Base64 ,
178
+ ) } /posts/${ encodeURIComponent ( postIdBlake3Base64 ) } /content`,
179
+ ) ,
174
180
) ;
175
181
const contentType = opts . contentType || '*/*' ;
176
182
const acceptLangs = opts . langs
You can’t perform that action at this time.
0 commit comments