14.5 Content API에 커스터마이징하기

    이제 Strapi 서버의 디렉터리를 VS Code로 열어보세요. api 디렉터리를 보면 앞에서 만든 콘텐트 타입마다 디렉터리가 생성되어 있을 것입니다. api/article/config/routes.json 파일을 열어보세요.

    api/article/config/routes.json

    {
      "routes": [
        {
          "method": "GET",
          "path": "/articles",
          "handler": "article.find",
          "config": {
            "policies": []
          }
        },
        {
          "method": "GET",
          "path": "/articles/count",
          "handler": "article.count",
          "config": {
            "policies": []
          }
        },
        {
          "method": "GET",
          "path": "/articles/:id",
          "handler": "article.findOne",
          "config": {
            "policies": []
          }
        },
        {
          "method": "POST",
          "path": "/articles",
          "handler": "article.create",
          "config": {
            "policies": []
          }
        },
        {
          "method": "PUT",
          "path": "/articles/:id",
          "handler": "article.update",
          "config": {
            "policies": []
          }
        },
        {
          "method": "DELETE",
          "path": "/articles/:id",
          "handler": "article.delete",
          "config": {
            "policies": []
          }
        }
      ]
    }
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.