Skip to content

Commit

Permalink
Merge pull request #10 from potathon/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
TopazKang authored Oct 2, 2024
2 parents e41641f + 8a00781 commit 73c25ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ app.get("/", (req, res) => {
// app.use('/api-docs', swaggerUI.serve, swaggerUI.setup(swaggerFile, {explorer:true}));

// posts 엔드포인트 분리
app.use('/posts', posts_route);
app.use('/api/posts', posts_route);

app.use('/images', express.static('uploads'));

Expand Down
10 changes: 5 additions & 5 deletions routes/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ const storage = multer.diskStorage({
const upload = multer({storage});


router.get('/api/', listupPosts);
router.get('/', listupPosts);

router.get('/api/:id', readPost);
router.get('/:id', readPost);

router.post('/api/',upload.single('post_image_path') ,createPost);
router.post('/',upload.single('post_image_path') ,createPost);

router.patch('/api/', upload.single('post_image_path'), modifyPost);
router.patch('/', upload.single('post_image_path'), modifyPost);

router.delete('/api/', deletePost);
router.delete('/', deletePost);

module.exports = router;

0 comments on commit 73c25ac

Please sign in to comment.