message: Setup stub endpoints for card sources
diff: @@ -20,6 +20,10 @@ import {
  } from './routes/card-routes';
  import { assertCardExists } from './middleware/card-utils';
  +function unimpl() {
  + throw new Error('unimplemented');
  +}
  +
  export class Server {
  static async create(options: ServerOptions): Promise<Server> {
  let { realms, cardCacheDir, routeCard } = options;
  @@ -47,14 +51,13 @@ export class Server {
  koaRouter.patch(`/cards/:encodedCardURL`, assertCardExists, updateCard);
  koaRouter.delete(`/cards/:encodedCardURL`, assertCardExists, deleteCard);
  - // // the 'sources' section of the API deals in RawCards. It's where you can do
  - // // CRUD operations on the sources themselves. It's a superset of what you
  - // // can do via the 'cards' section.
  - // TODO:
  - // koaRouter.get( `/sources/:encodedCardURL`, assertCardExists, sourceRoutes.getCard);
  - // koaRouter.post(`/sources/:encodedCardURL`, sourceRoutes.createCard);
  - // koaRouter.patch( `/sources/:encodedCardURL`, assertCardExists, sourceRoutes.updateCard);
  - // koaRouter.delete( `/sources/:encodedCardURL`, assertCardExists, sourceRoutes.deleteCard);
  + // the 'sources' section of the API deals in RawCards. It's where you can do
  + // CRUD operations on the sources themselves. It's a superset of what you
  + // can do via the 'cards' section.
  + koaRouter.get(`/sources/new`, assertCardExists, unimpl);
  + koaRouter.post(`/sources/:encodedCardURL`, unimpl);
  + koaRouter.patch(`/sources/:encodedCardURL`, assertCardExists, unimpl);
  + koaRouter.delete(`/sources/:encodedCardURL`, assertCardExists, unimpl);
  // card-based routing is a layer on top of the 'cards' section where you can
  // fetch card data indirectly.
  