Skip to content
Snippets Groups Projects
Commit a16118c0 authored by Gwangbin's avatar Gwangbin
Browse files

Update README file

parent 85c49b2e
Branches
No related tags found
No related merge requests found
...@@ -7,3 +7,34 @@ ...@@ -7,3 +7,34 @@
#### 프론트: cd frontend; npm run start #### 프론트: cd frontend; npm run start
#### 백앤드: cd backend; npm run start #### 백앤드: cd backend; npm run start
프론트 백 모두 문서 저장되면 다시 로딩 되니까 두개 한번에 켜놓고 수정하시면 되시겠습니다. 프론트 백 모두 문서 저장되면 다시 로딩 되니까 두개 한번에 켜놓고 수정하시면 되시겠습니다.
## Auth Specification
|Method|Path|Message Format(JSON)|설명|
|---|---|---|---|
|POST|/auth/login|{
"email": string,
"name": string,
"sub": string,
"picture": string,
}|로그인 요청|
|GET|/auth/logout||로그아웃 요청|
|GET|/auth/session||세션 연결 확인 요청|
## Article Specification
|Method|Path|Message Format(JSON)|설명|
|---|---|---|---|
|POST|/article|{
"title": string,
"content": string,
"img": string[],
"keyword": string,
"latitiude": number,
"longitude": number
}|게시글 작성 요청|
|GET|/article||전체 게시글 요청|
|GET|/article/[id]||특정 게시글 요청|
|POST|/article/[id]/comment|{
"content": string
}|댓글 작성 요청|
|DELETE|/article/[articleId]/comment/[commentId]||특정 댓글 삭제 요청|
|PUT|/article/[id]/like||게시글 좋아요 요청|
\ No newline at end of file
...@@ -107,7 +107,7 @@ router.delete("/:articleid/comment/:commentid", async (req, res) => { ...@@ -107,7 +107,7 @@ router.delete("/:articleid/comment/:commentid", async (req, res) => {
res.send(JSON.stringify(articles)); res.send(JSON.stringify(articles));
}); });
router.put("/:id/comment/like", async (req, res) => { router.put("/:id/like", async (req, res) => {
if (!req.session.sessionid) { if (!req.session.sessionid) {
console.log("No session"); console.log("No session");
} }
......
...@@ -44,7 +44,7 @@ function PostRead() { ...@@ -44,7 +44,7 @@ function PostRead() {
}, []); }, []);
function SetLike(){ function SetLike(){
axios.put(`http://localhost:8080/article/${params.id}/comment/like`) axios.put(`http://localhost:8080/article/${params.id}/like`)
.then(res => { .then(res => {
alert("The comment is successfully uploaded"); alert("The comment is successfully uploaded");
return requestLoadArticleById(params.id) return requestLoadArticleById(params.id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment