GitHub

DaffInMemoryBackendOrderService

An in-memory service that stubs out the backend services for getting orders.

import { DaffInMemoryBackendOrderService } from '@daffodil/order/driver/in-memory'
@Injectable()
class DaffInMemoryBackendOrderService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
  readonly collectionName: DAFF_ORDER_IN_MEMORY_COLLECTION_NAME
  orders: DaffOrder[]
  get(reqInfo: RequestInfo_2): any
  post(reqInfo: RequestInfo_2): any
}

Properties

Name Type Description
collectionName DAFF_ORDER_IN_MEMORY_COLLECTION_NAME

The collection name of the backend service where the backend only serves one collection. Used for routing requests to the correct backend.

orders DaffOrder[]
get any

Responds to GET requests.

post any