diff options
author | Teddy Wing | 2018-11-13 15:51:09 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-13 15:51:09 +0100 |
commit | 2fe4c73ed2a96bf93075aa8448d0f862f2300371 (patch) | |
tree | 5dd5e07ef805020a4c3daa41d6727ac079ac21f5 /license-generator/src/errors.rs | |
parent | ffdabdb4ab1be347a011211cf54ecd0d27f9cf1b (diff) | |
download | dome-key-web-2fe4c73ed2a96bf93075aa8448d0f862f2300371.tar.bz2 |
license: Extract response logic from `/license/download`
I want to be able to use the exact same logic for the `/license` route.
To do so, we move the common logic to a new `build_response()` function.
For all responses we need to return from `build_response()`, make new
structs `HtmlResponse` and `ZipResponse` that write the response in the
desired format.
The `ZipResponse` does what we're already doing in `/license/download`.
The `HtmlResponse` will respond with HTML and show a thank-you page on
success.
Diffstat (limited to 'license-generator/src/errors.rs')
0 files changed, 0 insertions, 0 deletions