simulant-example icon indicating copy to clipboard operation
simulant-example copied to clipboard

Trivial store: admin URLs to load the category and product data

Open mtnygard opened this issue 11 years ago • 0 comments

We will need a way for the simulation to load its data into the production system. Instead of going directly through the database, this example will load it via an admin interface.

Create a new route for /admin/categories, with a POST handler. The handler should expect EDN formatted data which will be a list of maps. Each map is a category. At present, the only map key we use is :id, which will have a string value. The POST handler should transact the categories into the Datomic database. Adding a category is idempotent, so there is no need to delete old data.

Create a similar route for /admin/skus. Also taking a list of maps, also only the :id key matters.

mtnygard avatar Dec 05 '14 13:12 mtnygard