diff options
author | crupest <crupest@outlook.com> | 2022-04-25 19:27:44 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-04-25 19:27:44 +0800 |
commit | f2ead327344fdacdf3fb1e761b4fb8ec89330f1e (patch) | |
tree | c04e46a1517191440a72932f4314bd1f64503fab /FrontEnd/src/http/bookmark.ts | |
parent | 60ec53aa2ad9687f5d8661322fb3e1e03e291eba (diff) | |
download | timeline-f2ead327344fdacdf3fb1e761b4fb8ec89330f1e.tar.gz timeline-f2ead327344fdacdf3fb1e761b4fb8ec89330f1e.tar.bz2 timeline-f2ead327344fdacdf3fb1e761b4fb8ec89330f1e.zip |
...
Diffstat (limited to 'FrontEnd/src/http/bookmark.ts')
-rw-r--r-- | FrontEnd/src/http/bookmark.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/FrontEnd/src/http/bookmark.ts b/FrontEnd/src/http/bookmark.ts index 382543ff..40e121cc 100644 --- a/FrontEnd/src/http/bookmark.ts +++ b/FrontEnd/src/http/bookmark.ts @@ -1,4 +1,5 @@ -import { applyQueryParameters } from "@/utilities/url"; +import { withQuery } from "@/utilities/url"; + import { axios, apiBaseUrl, extractResponseData, Page } from "./common"; export interface TimelineBookmark { @@ -37,10 +38,10 @@ export class HttpHighlightClient implements IHttpBookmarkClient { page?: number, pageSize?: number ): Promise<Page<TimelineBookmark>> { - const url = applyQueryParameters( - `${apiBaseUrl}/v2/users/${username}/bookmarks`, - { page, pageSize } - ); + const url = withQuery(`${apiBaseUrl}/v2/users/${username}/bookmarks`, { + page, + pageSize, + }); return axios.get<Page<TimelineBookmark>>(url).then(extractResponseData); } |