Skip to content

Commit

Permalink
Merge pull request #1857 from PatrickWaweru/fixAppointmentsVersionRev…
Browse files Browse the repository at this point in the history
…ertO3redirects

Fix appointments version revert o3 redirects
  • Loading branch information
makombe authored Apr 15, 2024
2 parents 42f25ee + cedae8c commit 5a92733
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public class EmrOpenmrsUrlOverrideController {

private static final String OPENMRS_HOME_URL = "index.htm";
private static final String OPENMRS_LOGIN_URL = "login.htm";
private static final String KENYAEMR_HOME_URL = "spa/home";
private static final String KENYAEMR_LOGIN_URL = "spa/login";
private static final String KENYAEMR_HOME_URL = EmrConstants.MODULE_ID + "/home.page";
private static final String KENYAEMR_LOGIN_URL = EmrConstants.MODULE_ID + "/login.page";
private static final String KENYAEMR_FORGOTPASSWORD_URL = EmrConstants.MODULE_ID + "/forgotPassword.page";
private static final String KENYAEMR_HELPDIALOG_URL = EmrConstants.MODULE_ID + "/helpDialog.page";

Expand All @@ -32,7 +32,7 @@ public class EmrOpenmrsUrlOverrideController {
*/
@RequestMapping("/index.htm")
public String showOurHomePage() {
return Context.isAuthenticated() ? ("redirect:" + KENYAEMR_HOME_URL) : ("redirect:" + OPENMRS_LOGIN_URL);
return Context.isAuthenticated() ? ("forward:/" + KENYAEMR_HOME_URL) : ("redirect:/" + OPENMRS_LOGIN_URL);
}

/**
Expand All @@ -41,7 +41,7 @@ public String showOurHomePage() {
*/
@RequestMapping("/login.htm")
public String showOurLoginPage() {
return Context.isAuthenticated() ? ("redirect:" + OPENMRS_HOME_URL) : ("redirect:" + KENYAEMR_LOGIN_URL);
return Context.isAuthenticated() ? ("redirect:/" + OPENMRS_HOME_URL) : ("forward:/" + KENYAEMR_LOGIN_URL);
}

/**
Expand All @@ -50,7 +50,7 @@ public String showOurLoginPage() {
*/
@RequestMapping("/forgotPassword.form")
public String showOurForgotPasswordPage() {
return Context.isAuthenticated() ? ("redirect:/" + OPENMRS_HOME_URL) : ("redirect:/" + KENYAEMR_FORGOTPASSWORD_URL);
return Context.isAuthenticated() ? ("redirect:/" + OPENMRS_HOME_URL) : ("forward:/" + KENYAEMR_FORGOTPASSWORD_URL);
}
/**
* Handles requests to helpDialog.form. If user is authenticated they will be redirected to this modules's home
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
<webservicesRestVersion>2.26.0</webservicesRestVersion>
<reportingcompatibilityVersion>2.0.9</reportingcompatibilityVersion>
<legacyUiVersion>1.15.0</legacyUiVersion>
<bahmniAppointmentsVersion>2.0.0-SNAPSHOT</bahmniAppointmentsVersion>
<!-- <bahmniAppointmentsVersion>2.0.0-SNAPSHOT</bahmniAppointmentsVersion> -->
<bahmniAppointmentsVersion>1.5.0</bahmniAppointmentsVersion>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ssZ</maven.build.timestamp.format>
Expand Down

0 comments on commit 5a92733

Please sign in to comment.