mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-03-13 15:39:18 +08:00
changed org to use z over s
This commit is contained in:
parent
c8bd4c0442
commit
310dfdf5ed
@ -47,13 +47,13 @@ public class OrgController extends HangarController {
|
||||
this.routeHelper = routeHelper;
|
||||
}
|
||||
|
||||
@RequestMapping("/organisations/invite/{id}/{status}")
|
||||
@RequestMapping("/organizations/invite/{id}/{status}")
|
||||
public Object setInviteStatus(@PathVariable Object id, @PathVariable Object status) {
|
||||
return null; // TODO implement setInviteStatus request controller
|
||||
}
|
||||
|
||||
@Secured("ROLE_USER")
|
||||
@GetMapping("/organisations/new")
|
||||
@GetMapping("/organizations/new")
|
||||
public ModelAndView showCreator(RedirectAttributes attributes, ModelMap modelMap) {
|
||||
if (orgService.getUserOwnedOrgs(userService.getCurrentUser().getId()).size() >= hangarConfig.org.getCreateLimit()) {
|
||||
AlertUtil.showAlert(attributes, AlertUtil.AlertType.ERROR, "error.org.createLimit", String.valueOf(hangarConfig.org.getCreateLimit()));
|
||||
@ -63,7 +63,7 @@ public class OrgController extends HangarController {
|
||||
}
|
||||
|
||||
@Secured("ROLE_USER")
|
||||
@PostMapping(value = "/organisations/new", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
||||
@PostMapping(value = "/organizations/new", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
|
||||
public ModelAndView create(@RequestParam String name, @RequestParam(required = false) List<Long> users, @RequestParam(required = false) List<Role> roles, RedirectAttributes attributes) {
|
||||
if (orgService.getUserOwnedOrgs(userService.getCurrentUser().getId()).size() >= hangarConfig.org.getCreateLimit()) {
|
||||
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "at create limit");
|
||||
@ -93,20 +93,20 @@ public class OrgController extends HangarController {
|
||||
}
|
||||
|
||||
@Secured("ROLE_USER")
|
||||
@RequestMapping("/organisations/{organisations}/settings/avatar")
|
||||
public Object updateAvatar(@PathVariable Object organisations) {
|
||||
@RequestMapping("/organizations/{organization}/settings/avatar")
|
||||
public Object updateAvatar(@PathVariable Object organization) {
|
||||
return null; // TODO implement updateAvatar request controller
|
||||
}
|
||||
|
||||
@Secured("ROLE_USER")
|
||||
@RequestMapping("/organisations/{organisations}/settings/members")
|
||||
public Object updateMembers(@PathVariable Object organisations) {
|
||||
@RequestMapping("/organizations/{organization}/settings/members")
|
||||
public Object updateMembers(@PathVariable Object organization) {
|
||||
return null; // TODO implement updateMembers request controller
|
||||
}
|
||||
|
||||
@Secured("ROLE_USER")
|
||||
@RequestMapping("/organisations/{organisations}/settings/members/remove")
|
||||
public Object removeMember(@PathVariable Object organisations) {
|
||||
@RequestMapping("/organizations/{organization}/settings/members/remove")
|
||||
public Object removeMember(@PathVariable Object organization) {
|
||||
return null; // TODO implement removeMember request controller
|
||||
}
|
||||
|
||||
|
@ -108,12 +108,12 @@ public class RouteHelper {
|
||||
register("users.userSitemap", "/{user}/sitemap.xml", of("user"), of());
|
||||
register("users.editApiKeys", "/{user}/settings/apiKeys", of("user"), of());
|
||||
|
||||
register("org.updateMembers", "/organisations/{organisations}/settings/members", of("organisations"), of());
|
||||
register("org.updateAvatar", "/organisations/{organisations}/settings/avatar", of("organisations"), of());
|
||||
register("org.setInviteStatus", "/organisations/invite/{id}/{status}", of("id", "status"), of());
|
||||
register("org.showCreator", "/organisations/new", of(), of());
|
||||
register("org.create", "/organisations/new", of(), of());
|
||||
register("org.removeMember", "/organisations/{organisations}/settings/members/remove", of("organisations"), of());
|
||||
register("org.updateMembers", "/organizations/{organization}/settings/members", of("organization"), of());
|
||||
register("org.updateAvatar", "/organizations/{organization}/settings/avatar", of("organization"), of());
|
||||
register("org.setInviteStatus", "/organizations/invite/{id}/{status}", of("id", "status"), of());
|
||||
register("org.showCreator", "/organizations/new", of(), of());
|
||||
register("org.create", "/organizations/new", of(), of());
|
||||
register("org.removeMember", "/organizations/{organization}/settings/members/remove", of("organization"), of());
|
||||
|
||||
register("reviews.addMessage", "/{author}/{slug}/versions/{version}/reviews/addmessage", of("author", "slug", "version"), of());
|
||||
register("reviews.backlogToggle", "/{author}/{slug}/versions/{version}/reviews/reviewtoggle", of("author", "slug", "version"), of());
|
||||
|
@ -18,7 +18,7 @@ class RouteHelperTest {
|
||||
@Test
|
||||
void testSomeShit() throws Exception {
|
||||
assertEquals("/", classUnderTest.getRouteUrl("showHome"));
|
||||
assertEquals("/organisations/new", classUnderTest.getRouteUrl("org.showCreator"));
|
||||
assertEquals("/organizations/new", classUnderTest.getRouteUrl("org.showCreator"));
|
||||
assertEquals("/linkout", classUnderTest.getRouteUrl("linkOut", ""));
|
||||
assertEquals("/linkout?remoteUrl=TestUrl", classUnderTest.getRouteUrl("linkOut", "TestUrl"));
|
||||
assertEquals("/staff", classUnderTest.getRouteUrl("users.showStaff", "", ""));
|
||||
|
Loading…
Reference in New Issue
Block a user