aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/http
diff options
context:
space:
mode:
Diffstat (limited to 'FrontEnd/src/app/http')
-rw-r--r--FrontEnd/src/app/http/timeline.ts27
1 files changed, 7 insertions, 20 deletions
diff --git a/FrontEnd/src/app/http/timeline.ts b/FrontEnd/src/app/http/timeline.ts
index ed02a65b..228b6105 100644
--- a/FrontEnd/src/app/http/timeline.ts
+++ b/FrontEnd/src/app/http/timeline.ts
@@ -1,6 +1,6 @@
import { AxiosError } from "axios";
-import { updateQueryString, applyQueryParameters } from "../utilities/url";
+import { applyQueryParameters } from "../utilities/url";
import {
axios,
@@ -383,26 +383,13 @@ export class HttpTimelineClient implements IHttpTimelineClient {
includeDeleted?: boolean;
}
): Promise<HttpTimelineGenericPostInfo[]> {
- let url = `${apiBaseUrl}/timelines/${timelineName}/posts`;
- if (query != null) {
- if (query.modifiedSince != null) {
- url = updateQueryString(
- "modifiedSince",
- query.modifiedSince.toISOString(),
- url
- );
- }
- if (query.includeDeleted != null) {
- url = updateQueryString(
- "includeDeleted",
- query.includeDeleted ? "true" : "false",
- url
- );
- }
- }
-
return axios
- .get<RawTimelineGenericPostInfo[]>(url)
+ .get<RawTimelineGenericPostInfo[]>(
+ applyQueryParameters(
+ `${apiBaseUrl}/timelines/${timelineName}/posts`,
+ query
+ )
+ )
.then(extractResponseData)
.catch(convertToIfStatusCodeIs(404, HttpTimelineNotExistError))
.catch(convertToForbiddenError)