Edit this topic

Content api route handler

: shell

: middleware

: content-api

: /modules/core/content/services/content-api-route-handler.js

: https://github.com/DecentCMS/DecentCMS/blob/master/modules/core/content/services/content-api-route-handler.js


This handler registers itself as an Express middleware that handles a catchall route with a relatively low priority, for content API.

ContentApiRouteHandler.register(scope, context)

Registers the default content API middleware.

  • /api/src/ in front of a content item id gets its document source.
  • /api/shapes/ in front of a content item is gets the processed shape for it.
Param Type Description
scope object The scope.
context object The context.
context.expressApp object The Express application object.