Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

기여API 작성 #62

Open
earlysummer0303 opened this issue Jul 29, 2021 · 2 comments
Open

기여API 작성 #62

earlysummer0303 opened this issue Jul 29, 2021 · 2 comments
Assignees
Labels

Comments

@earlysummer0303
Copy link
Collaborator

기여작api작성

@earlysummer0303
Copy link
Collaborator Author

  1. controller 이슈
  • controllers/contributeprojects/index.js 페이지 안에 코드 작성

2)routes/page.js

  • const contributeProjectController = require("../controllers/contributeProjects”); 추가

router.post(

"/contributeProjects",

upload.single("data"),

contributeProjectController.createContriProjectAPI

);

추가

  1. 참조
  • middleware.js 에서 ' upload_commit ' 참조함 ( controllers/contributeprojects/index.js 에서 사용함)

@earlysummer0303
Copy link
Collaborator Author

issue 추가 사항 !!

  • 기여작 업로드 api의 주소가 "/requestProjects/:id/comments" 으로 변경되었습니다.
  • req.params.id를 'Comment' 테이블의 pid 속성 (외래키) 로 받습니다.
  • pid는 요청작의 id에 해당합니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant