기존 PUT 메서드에 연결했던 replace는 구현하지 않을 것이므로 해당 함수는 아예 제거했습니다. 이에 따라 posts 라우트의 PUT 메서드를 설정한 부분도 src/api/posts/index.js에서 제거하세요.

    src/api/posts/index.js

    import Router from 'koa-router';
    import * as postsCtrl from './posts.ctrl';
    
    const posts = new Router();
    
    posts.get('/', postsCtrl.list);
    posts.post('/', postsCtrl.write);
    posts.get('/:id', postsCtrl.read);
    posts.delete('/:id', postsCtrl.remove);
    posts.patch('/:id', postsCtrl.update);
    
    export default posts;

    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.