diff options
author | crupest <crupest@outlook.com> | 2021-01-11 21:58:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-11 21:58:32 +0800 |
commit | 5d3a3111bbc349d5d5ff0a4ed92f97b14a9d65fe (patch) | |
tree | d635081fb6eaa0222270bfb4ac29906fb767a9bd /FrontEnd/src/app/http/highlight.ts | |
parent | 777efa6e0405f4e871de4da21b939e30ed07f754 (diff) | |
parent | 26f02d90c2571251b32c3b03b970dd290e3892e6 (diff) | |
download | timeline-5d3a3111bbc349d5d5ff0a4ed92f97b14a9d65fe.tar.gz timeline-5d3a3111bbc349d5d5ff0a4ed92f97b14a9d65fe.tar.bz2 timeline-5d3a3111bbc349d5d5ff0a4ed92f97b14a9d65fe.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.ts | 21 |
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(); } |