aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/http/timeline.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-04-11 22:59:41 +0800
committercrupest <crupest@outlook.com>2022-04-11 22:59:41 +0800
commit9c0cb8f8d3944c813ef28ff9f736f148fd701a66 (patch)
tree69842e08eaf6d16a055d464d46ba435a188c8d39 /FrontEnd/src/http/timeline.ts
parent65210138df643a475632690e2fb20401c1edbb95 (diff)
downloadtimeline-9c0cb8f8d3944c813ef28ff9f736f148fd701a66.tar.gz
timeline-9c0cb8f8d3944c813ef28ff9f736f148fd701a66.tar.bz2
timeline-9c0cb8f8d3944c813ef28ff9f736f148fd701a66.zip
...
Diffstat (limited to 'FrontEnd/src/http/timeline.ts')
-rw-r--r--FrontEnd/src/http/timeline.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/FrontEnd/src/http/timeline.ts b/FrontEnd/src/http/timeline.ts
index 49a7b8f2..65717a83 100644
--- a/FrontEnd/src/http/timeline.ts
+++ b/FrontEnd/src/http/timeline.ts
@@ -8,6 +8,7 @@ import {
extractResponseData,
convertToIfStatusCodeIs,
getHttpToken,
+ Page,
} from "./common";
import { HttpUser } from "./user";
@@ -115,7 +116,7 @@ export interface IHttpTimelineClient {
listPost(
ownerUsername: string,
timelineName: string
- ): Promise<HttpTimelinePostInfo[]>;
+ ): Promise<Page<HttpTimelinePostInfo>>;
generatePostDataUrl(
ownerUsername: string,
timelineName: string,
@@ -217,9 +218,9 @@ export class HttpTimelineClient implements IHttpTimelineClient {
listPost(
ownerUsername: string,
timelineName: string
- ): Promise<HttpTimelinePostInfo[]> {
+ ): Promise<Page<HttpTimelinePostInfo>> {
return axios
- .get<HttpTimelinePostInfo[]>(
+ .get<Page<HttpTimelinePostInfo>>(
`${apiBaseUrl}/v2/timelines/${ownerUsername}/${timelineName}/posts`
)
.then(extractResponseData);