Skip to content

Commit 95ad89b

Browse files
authored
Merge pull request #23 from GEBIT/add-compare-redirect
Add redirects for /compare
2 parents 185a0ca + 94d5020 commit 95ad89b

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

src/main/java/com/dkaedv/glghproxy/controller/RedirectsController.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,23 @@ public String repoTree(
5757
return "redirect:" + gitlabUrl + "/" + namespace + "/" + repo + "/tree/" + branch;
5858
}
5959

60+
@RequestMapping("/{namespace}/{repo}/compare")
61+
public String compare(
62+
@PathVariable String namespace,
63+
@PathVariable String repo
64+
) {
65+
66+
return "redirect:" + gitlabUrl + "/" + namespace + "/" + repo + "/compare";
67+
}
68+
69+
@RequestMapping("/{namespace}/{repo}/compare/{spec}")
70+
public String compare(
71+
@PathVariable String namespace,
72+
@PathVariable String repo,
73+
@PathVariable String spec
74+
) {
75+
76+
return "redirect:" + gitlabUrl + "/" + namespace + "/" + repo + "/compare/" + spec;
77+
}
78+
6079
}

0 commit comments

Comments
 (0)