add new Controller to redirect
This commit is contained in:
@ -80,7 +80,7 @@ public class Gruppen2Controller {
|
|||||||
Account account = keyCloakService.createAccountFromPrincipal(token);
|
Account account = keyCloakService.createAccountFromPrincipal(token);
|
||||||
controllerService.createGroup(account, title, beschreibung);
|
controllerService.createGroup(account, title, beschreibung);
|
||||||
|
|
||||||
return "redirect:/gruppen2";
|
return "redirect:/gruppen2/";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/main/java/mops/gruppen2/controller/MopsController.java
Normal file
13
src/main/java/mops/gruppen2/controller/MopsController.java
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
package mops.gruppen2.controller;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class MopsController {
|
||||||
|
|
||||||
|
@GetMapping("")
|
||||||
|
public String redirect(){
|
||||||
|
return "redirect:/gruppen2/";
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -19,6 +19,8 @@ public class UserService {
|
|||||||
this.groupService = groupService;
|
this.groupService = groupService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Test nötig??
|
||||||
|
|
||||||
public List<Group> getUserGroups(String user_id) throws EventException {
|
public List<Group> getUserGroups(String user_id) throws EventException {
|
||||||
List<Long> group_ids = eventRepository.findGroup_idsWhereUser_id(user_id);
|
List<Long> group_ids = eventRepository.findGroup_idsWhereUser_id(user_id);
|
||||||
List<Event> events = groupService.getGroupEvents(group_ids);
|
List<Event> events = groupService.getGroupEvents(group_ids);
|
||||||
|
|||||||
@ -36,7 +36,6 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="beschreibung">Beschreibung der Gruppe</label>
|
<label for="beschreibung">Beschreibung der Gruppe</label>
|
||||||
<textarea type="text" class="form-control" id="beschreibung" th:name="beschreibung">
|
<textarea type="text" class="form-control" id="beschreibung" th:name="beschreibung">
|
||||||
|
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
Reference in New Issue
Block a user