-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
102 changed files
with
1,501 additions
and
896 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { DELETE, GET, POST, PUT } from "../utils/axios"; | ||
|
||
export const getArticleList = async (type: string, page: number) => | ||
await GET(`/article?type=${type}&page=${page}`); | ||
|
||
export const getArticleDetail = async (articleId: string) => | ||
await GET(`/article/${articleId}`, true); | ||
|
||
export const getMyArticleList = async (page: number) => | ||
await GET(`/article/my?page=${page}`, true); | ||
|
||
export const getMyCommentList = async (page: number) => | ||
await GET(`/article/comment/my?page=${page}`, true); | ||
|
||
export const postNewArticle = async (body: any) => | ||
await POST(`/article`, body, true); | ||
|
||
export const updateMyArticle = async (articleId: string, body: any) => | ||
await PUT(`/article/${articleId}`, body, true); | ||
|
||
export const deleteMyArticle = async (articleId: number) => | ||
await DELETE(`/article/${articleId}`, true); | ||
|
||
export const postNewComment = async (articleId: string, comment: string) => | ||
await POST(`/article/comment/${articleId}?content=${comment}`, {}, true); | ||
|
||
export const deleteMyComment = async (commentId: number) => | ||
await DELETE(`/article/comment/${commentId}`, true); | ||
|
||
export const postNewReply = async (commentId: number, reply: string) => | ||
await POST(`/article/reply/${commentId}?content=${reply}`, {}, true); | ||
|
||
export const deleteMyReply = async (replyId: number) => | ||
await DELETE(`/article/reply/${replyId}`, true); | ||
|
||
export const searchArticle = async ( | ||
keyword: string, | ||
type: string, | ||
page: number | ||
) => | ||
await GET( | ||
`/article/search?type=${type}&keyword=${keyword}&page=${page}`, | ||
true | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { DELETE, GET, POST, PUT } from "../utils/axios"; | ||
|
||
export const getCourseDetail = async (courseId: number | string) => | ||
await GET(`/course/${courseId}`, true); | ||
|
||
export const postNewCourse = async (body: any) => | ||
await POST("/course", body, true); | ||
|
||
export const putCourseDetail = async (courseId: string, body: any) => | ||
await PUT(`/course/${courseId}`, body, true); | ||
|
||
export const deleteCourse = async (courseId: string) => | ||
await DELETE(`/course/${courseId}`, true); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { GET, POST, PUT, DELETE } from "../utils/axios"; | ||
|
||
export const getAllMarkers = async () => await GET("/destination/map", true); | ||
|
||
export const getSearchInfo = async (searchKeyword: string) => | ||
await GET(`/destination?keyword=${searchKeyword}`, true); | ||
|
||
export const getDestinationDetail = async (destinationId: number) => | ||
await GET(`/destination/${destinationId}`, true); | ||
|
||
export const postDestinationComment = async ( | ||
data: any, | ||
destinationId: number | ||
) => await POST(`/destination/review/${destinationId}`, data, true); | ||
|
||
export const putDestinationComment = async (data: any, reviewId: number) => | ||
await PUT(`/destination/review/${reviewId}`, data, true); | ||
|
||
export const deleteDestinationComment = async (reviewId: number) => | ||
await DELETE(`/destination/review/${reviewId}`, true); | ||
|
||
export const postLikeDestination = async (destinationId: number) => | ||
await POST(`/destination/dibs/${destinationId}`, {}, true); | ||
|
||
export const deleteUnLikeDestination = async (destinationId: number) => | ||
await DELETE(`/destination/dibs/${destinationId}`, true); | ||
|
||
export const getLikeDestination = async () => | ||
await GET(`/destination/dibs`, true); | ||
|
||
export const postNewDestinationUser = async (body: any) => | ||
await POST("/destination/by-user", body, true); | ||
|
||
export const postNewDestinationAdmin = async (body: any) => | ||
await POST("/destination", body, true); | ||
|
||
export const putDestinationAdmin = async (data: any, destinationId: number) => | ||
await PUT(`/destination/${destinationId}`, data, true); | ||
|
||
export const deleteDestinationAdmin = async (destinationId: number) => | ||
await DELETE(`/destination/${destinationId}`, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { GET, PUT, DELETE, POST } from "../utils/axios"; | ||
import { GET, PUT, DELETE } from "../utils/axios"; | ||
|
||
export const getNotification = async () => await GET("/notification", true); | ||
|
||
export const putNotification = async (notificationId) => | ||
export const putNotification = async (notificationId: number) => | ||
await PUT(`/notification/${notificationId}`, {}, true); | ||
|
||
export const deleteNotification = async (notificationId) => | ||
export const deleteNotification = async (notificationId: number) => | ||
await DELETE(`/notification/${notificationId}`, true); | ||
|
||
export const putAllNotification = async () => | ||
await PUT("/notification/all", {}, true); | ||
|
||
export const putFirebaseToken = async (body) => | ||
export const putFirebaseToken = async (body: any) => | ||
await PUT("/firebase", body, true); | ||
|
||
export const deleteFirebaseToken = async (body) => | ||
export const deleteFirebaseToken = async (body: any) => | ||
await DELETE("/firebase", true, body); |
Oops, something went wrong.