Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SicDoRak
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2023_2_WebPromgramming_8
SicDoRak
Commits
a16118c0
Commit
a16118c0
authored
1 year ago
by
Gwangbin
Browse files
Options
Downloads
Patches
Plain Diff
Update README file
parent
85c49b2e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+31
-0
31 additions, 0 deletions
README.md
backend/src/article/articleController.js
+1
-1
1 addition, 1 deletion
backend/src/article/articleController.js
frontend/src/pages/PostRead.js
+1
-1
1 addition, 1 deletion
frontend/src/pages/PostRead.js
with
33 additions
and
2 deletions
README.md
+
31
−
0
View file @
a16118c0
...
@@ -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
This diff is collapsed.
Click to expand it.
backend/src/article/articleController.js
+
1
−
1
View file @
a16118c0
...
@@ -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
"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
frontend/src/pages/PostRead.js
+
1
−
1
View file @
a16118c0
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment