aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/http/highlight.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-01-11 21:58:32 +0800
committerGitHub <noreply@github.com>2021-01-11 21:58:32 +0800
commit5f08a5afe39fb680a14982255d366335bcef5d6e (patch)
tree9deed1bab5913de2e2e31e1b7a8f14e7ee699cf8 /FrontEnd/src/app/http/highlight.ts
parent6d30c089c02591ce2f57cf22fe0c41c17c62fbc3 (diff)
parent21ee6d4b78566a857559c5e393ae85731d380092 (diff)
downloadtimeline-5f08a5afe39fb680a14982255d366335bcef5d6e.tar.gz
timeline-5f08a5afe39fb680a14982255d366335bcef5d6e.tar.bz2
timeline-5f08a5afe39fb680a14982255d366335bcef5d6e.zip
Merge pull request #206 from crupest/front-dev
Front development.
Diffstat (limited to 'FrontEnd/src/app/http/highlight.ts')
-rw-r--r--FrontEnd/src/app/http/highlight.ts21
1 files changed, 10 insertions, 11 deletions
diff --git a/FrontEnd/src/app/http/highlight.ts b/FrontEnd/src/app/http/highlight.ts
index 1f226c19..851d52ce 100644
--- a/FrontEnd/src/app/http/highlight.ts
+++ b/FrontEnd/src/app/http/highlight.ts
@@ -1,6 +1,5 @@
-import axios from "axios";
-
import {
+ axios,
apiBaseUrl,
convertToNetworkError,
extractResponseData,
@@ -19,9 +18,9 @@ export interface HttpHighlightMoveRequest {
export interface IHttpHighlightClient {
list(): Promise<HttpTimelineInfo[]>;
- put(timeline: string, token: string): Promise<void>;
- delete(timeline: string, token: string): Promise<void>;
- move(req: HttpHighlightMoveRequest, token: string): Promise<void>;
+ put(timeline: string): Promise<void>;
+ delete(timeline: string): Promise<void>;
+ move(req: HttpHighlightMoveRequest): Promise<void>;
}
export class HttpHighlightClient implements IHttpHighlightClient {
@@ -33,23 +32,23 @@ export class HttpHighlightClient implements IHttpHighlightClient {
.catch(convertToNetworkError);
}
- put(timeline: string, token: string): Promise<void> {
+ put(timeline: string): Promise<void> {
return axios
- .put(`${apiBaseUrl}/highlights/${timeline}?token=${token}`)
+ .put(`${apiBaseUrl}/highlights/${timeline}`)
.catch(convertToNetworkError)
.then();
}
- delete(timeline: string, token: string): Promise<void> {
+ delete(timeline: string): Promise<void> {
return axios
- .delete(`${apiBaseUrl}/highlights/${timeline}?token=${token}`)
+ .delete(`${apiBaseUrl}/highlights/${timeline}`)
.catch(convertToNetworkError)
.then();
}
- move(req: HttpHighlightMoveRequest, token: string): Promise<void> {
+ move(req: HttpHighlightMoveRequest): Promise<void> {
return axios
- .post(`${apiBaseUrl}/highlightop/move?token=${token}`, req)
+ .post(`${apiBaseUrl}/highlightop/move`, req)
.catch(convertToNetworkError)
.then();
}