mozilla/badgekit-backpack — pull request #20 by brianloveswords (2014-06-20 18:35:28+00:00)
Title: Piping hot baked badges [closes #11]

This adds one new model, and one new route. It also modifies one old model and one old route.

* New route: `GET /public/images/:badgeImageSlug` (which is auth whitelisted) for serving baked badges. Uses the
* New model: BadgeImages, which stores the badge image data (in base64).
* Modified model: EarnerBadges, added `badgeImageSlug` foreign key.
* Modified route: `POST /user/:userId/badges`, the interface remains the same however as part of the saving process, the remote badge image will be fetched, baked and stored locally in the BadgeImages model.
* Modified route: `GET /user/:userId/badges`, add `badgeBadgeUrl` to each of the badges in the `badges` array.
* Modified route: `GET /user/:userId/badges/:badgeId`, add `bakedBadgeUrl` to response