Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dev routes to directly test rendering of any mail or template #1145

Merged
merged 1 commit into from
Jan 3, 2018

Conversation

jinroh
Copy link
Contributor

@jinroh jinroh commented Jan 3, 2018

This PR adds the following routes in a dev release:

  • GET /dev/mails/:name
  • GET /dev/templates/:name

These routes can be used to help the development and directly render a specific mail or template. The query parameters given are used a input data for the template rendered. For the mail route, it possible to specify a ContentType query parameter to render text/plain or text/html mail.

@jinroh jinroh requested a review from nono January 3, 2018 15:22
@codecov-io
Copy link

codecov-io commented Jan 3, 2018

Codecov Report

Merging #1145 into master will decrease coverage by 0.06%.
The diff coverage is 7.31%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1145      +/-   ##
==========================================
- Coverage   85.11%   85.04%   -0.07%     
==========================================
  Files         176      177       +1     
  Lines       52163    52204      +41     
==========================================
+ Hits        44396    44399       +3     
- Misses       6341     6379      +38     
  Partials     1426     1426
Impacted Files Coverage Δ
web/dev.go 0% <0%> (ø)
pkg/workers/mails/mail_templates.go 93.28% <0%> (-0.3%) ⬇️
web/statik/handler.go 53.29% <0%> (ø) ⬆️
web/routing.go 82.05% <100%> (+0.47%) ⬆️
web/middlewares/basic_auth.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69d491b...c5132e5. Read the comment docs.

@jinroh jinroh merged commit 1d735ab into cozy:master Jan 3, 2018
@jinroh jinroh deleted the mails-dev-helpers branch January 3, 2018 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants