Skip to content

Commit

Permalink
Merge pull request #55 from IV1201-Group-2/bugfix/router
Browse files Browse the repository at this point in the history
Fix redirect issue in client-service instead of using hash router
  • Loading branch information
hannesmann authored Mar 4, 2024
2 parents 1cab166 + 3b981e9 commit 2154e48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@
@Slf4j
@Controller
public class ServerController {
@GetMapping("")
@GetMapping("/{path:[^\\.]*}")
public String acceptConnection(HttpServletRequest request) {
log.info("Application requested by {}", request.getRemoteAddr());
log.info("{} requested by {}", request.getRequestURI(), request.getRemoteAddr());
return "index.html";
}

@RequestMapping(value = "/{path:[^\\.]*}")
public String redirect() {
return "forward:/";
}
}
4 changes: 2 additions & 2 deletions src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createRouter, createWebHashHistory } from "vue-router";
import { createRouter, createWebHistory } from "vue-router";
import LoginView from "@/views/applicant/ApplicantLoginView.vue";
import ApplicantRegistrationView from "@/views/applicant/ApplicantRegistrationView.vue";
import ApplicationFormView from "@/views/applicant/ApplicationFormView.vue";
Expand All @@ -9,7 +9,7 @@ import HandleApplication from "@/views/recruiter/HandleApplication.vue";
import ApplicantPasswordResetView from "@/views/applicant/ApplicantPasswordResetView.vue";

const router = createRouter({
history: createWebHashHistory(import.meta.env.BASE_URL),
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: "/",
Expand Down
2 changes: 1 addition & 1 deletion src/stores/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const useAuthStore = defineStore("auth", () => {
return RESTError.None;
} else {
if (jsonResponse.error === RESTError.MissingPassword) {
resetLink.value = window.location.origin + "/#/password-reset?token=" + jsonResponse.details.reset_token;
resetLink.value = window.location.origin + "/password-reset?token=" + jsonResponse.details.reset_token;
}
return jsonResponse.error as RESTError;
}
Expand Down

0 comments on commit 2154e48

Please sign in to comment.