| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,9 +25,9 @@ trait Requests { | |||
| 25 | 25 | ||
| 26 | 26 | def getRequestFormat: RequestFormat = if(isJson) JsonFormat else if (isEmail) EmailFormat else if(isAmp) AmpFormat else HtmlFormat | |
| 27 | 27 | ||
| 28 | - lazy val isJson: Boolean = r.getQueryString("callback").isDefined || (r.path.endsWith(".json") && !isEmailJson) | ||
| 28 | + lazy val isJson: Boolean = r.getQueryString("callback").isDefined || r.path.endsWith(".json") | ||
| 29 | 29 | ||
| 30 | - lazy val isEmailJson: Boolean = r.path.endsWith(s"$EMAIL_SUFFIX.json") | ||
| 30 | + lazy val isEmailJson: Boolean = r.path.endsWith(".emailjson") | ||
| 31 | 31 | ||
| 32 | 32 | // parameters for moon/guui new rendering layer project. | |
| 33 | 33 | lazy val isGuuiJson: Boolean = isJson && isGuui | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,7 +30,7 @@ GET /*path/show-more/*id.json | |||
| 30 | 30 | GET /rss controllers.FaciaController.renderRootFrontRss() | |
| 31 | 31 | GET /*path/rss controllers.FaciaController.renderFrontRss(path) | |
| 32 | 32 | GET /*path/lite.json controllers.FaciaController.renderFrontJsonLite(path) | |
| 33 | - GET /*path/email.json controllers.FaciaController.renderFrontJson(path) | ||
| 33 | + GET /*path.emailjson controllers.FaciaController.renderFrontJson(path) | ||
| 34 | 34 | GET /*path.json controllers.FaciaController.renderFrontJson(path) | |
| 35 | 35 | GET / controllers.FaciaController.rootEditionRedirect() | |
| 36 | 36 | GET /*path controllers.FaciaController.renderFront(path) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -189,7 +189,7 @@ import scala.concurrent.Await | |||
| 189 | 189 | } | |
| 190 | 190 | ||
| 191 | 191 | it should "render json email fronts" in { | |
| 192 | - val emailRequest = FakeRequest("GET", "/email/uk/daily/email.json") | ||
| 192 | + val emailRequest = FakeRequest("GET", "/email/uk/daily.emailjson") | ||
| 193 | 193 | val emailJsonResponse = faciaController.renderFront("email/uk/daily")(emailRequest) | |
| 194 | 194 | status(emailJsonResponse) shouldBe 200 | |
| 195 | 195 | val jsonResponse = contentAsJson(emailJsonResponse) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments