Serves the figures of the client's /community page, which community-service.ts recomputes on a timer, and the community feed.

  • GET /api/community?period=weekly|monthly — signed in. Answers the site's figures over the last week (by default) or month.
  • GET /api/community/feed — signed in. Answers the latest things done in public and the week's figures.

Variables

v
default: Router

Mounted by api/main.ts behind the error, Open Graph and CORS middleware. An APIException thrown by a handler becomes the JSON error response there.

Usage

import * as mod from "api/routes/community.ts";