dwyl / mvp

📲 simplest version of the @dwyl app
https://mvp.fly.dev
GNU General Public License v2.0
87 stars 2 forks source link

[PR] Returning JSON in ErrorView when appropriate headers are passed #270

Closed LuchoTurtle closed 1 year ago

LuchoTurtle commented 1 year ago

closes #269

Will return a JSON response, even if Content-type is the only request header specified (Phoenix differentiates using the Accept header).

It also resolves a warning of a variable that was unused and removes app/datetime_parser.ex, which is unused and was introduced in a recent commit.

codecov[bot] commented 1 year ago

Codecov Report

Merging #270 (01e1ed2) into main (dcaaf18) will increase coverage by 9.34%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##             main      #270      +/-   ##
===========================================
+ Coverage   90.65%   100.00%   +9.34%     
===========================================
  Files          15        14       -1     
  Lines         428       400      -28     
===========================================
+ Hits          388       400      +12     
+ Misses         40         0      -40     
Impacted Files Coverage Δ
lib/app_web/views/error_view.ex 100.00% <100.00%> (ø)
lib/app_web/live/app_live.ex 100.00% <0.00%> (+0.83%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

LuchoTurtle commented 1 year ago

This PR should be complete and ready for review. 👍