docs: update endpoints to use file-routing approach (#5397)
- Move the original guides for creating endpoints and middlewares to sub-sections in the Endpoints category. - Replace existing guides for endpoints and middlewares with the new approach. - Update all endpoints-related snippets across docs to use this new approach.
This commit is contained in:
+34
-12
@@ -1403,11 +1403,11 @@ module.exports = {
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Endpoint",
|
||||
label: "API Routes",
|
||||
items: [
|
||||
{
|
||||
type: "doc",
|
||||
id: "development/endpoints/overview",
|
||||
id: "development/api-routes/overview",
|
||||
label: "Overview",
|
||||
},
|
||||
{
|
||||
@@ -1418,23 +1418,45 @@ module.exports = {
|
||||
},
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "development/endpoints/create",
|
||||
label: "Create an Endpoint",
|
||||
type: "category",
|
||||
label: "Create an API Route",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "development/api-routes/create",
|
||||
},
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
type: "doc",
|
||||
id: "development/api-routes/create-express-route",
|
||||
label: "Express-Router Approach",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
label: "Create a Middleware",
|
||||
link: {
|
||||
type: "doc",
|
||||
id: "development/api-routes/add-middleware",
|
||||
},
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
type: "doc",
|
||||
id: "development/api-routes/add-middleware-express-route",
|
||||
label: "Express-Router Approach",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "development/endpoints/add-middleware",
|
||||
label: "Middleware",
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "development/endpoints/extend-validator",
|
||||
id: "development/api-routes/extend-validator",
|
||||
label: "Extend Validator",
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "development/endpoints/example-logged-in-user",
|
||||
id: "development/api-routes/example-logged-in-user",
|
||||
label: "Example: Logged-In User",
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user