aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/http/highlight.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-01-09 01:07:35 +0800
committercrupest <crupest@outlook.com>2021-01-09 01:07:35 +0800
commit8edf6d566cecd94d251a4e29ae8c35b77f88d6db (patch)
tree0e4371f4a40fabaf5c87baca491d2631665cd2ae /FrontEnd/src/app/http/highlight.ts
parent777efa6e0405f4e871de4da21b939e30ed07f754 (diff)
downloadtimeline-8edf6d566cecd94d251a4e29ae8c35b77f88d6db.tar.gz
timeline-8edf6d566cecd94d251a4e29ae8c35b77f88d6db.tar.bz2
timeline-8edf6d566cecd94d251a4e29ae8c35b77f88d6db.zip
...
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();
}