fix for merge
This commit is contained in:
@ -82,7 +82,7 @@ public class Gruppen2Controller {
|
||||
@RequestParam(value = "title") String title,
|
||||
@RequestParam(value = "beschreibung") String beschreibung,
|
||||
@RequestParam(value = "visibility", required = false) Boolean visibility,
|
||||
@RequestParam("file") MultipartFile file) throws IOException {
|
||||
@RequestParam(value = "file") MultipartFile file) throws IOException, EventException {
|
||||
|
||||
Account account = keyCloakService.createAccountFromPrincipal(token);
|
||||
List<User> userList = CsvService.read(file.getInputStream());
|
||||
@ -219,10 +219,10 @@ public class Gruppen2Controller {
|
||||
@RequestParam (value = "user_id") String user_id) throws EventException {
|
||||
controllerService.deleteUser(user_id, group_id);
|
||||
return "redirect:/gruppen2/details/members/" + group_id;
|
||||
}
|
||||
|
||||
@GetMapping("*")
|
||||
public String defaultLink() {
|
||||
return "errorRenameLater";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,12 +7,6 @@ import mops.gruppen2.domain.event.*;
|
||||
import mops.gruppen2.security.Account;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import mops.gruppen2.domain.event.*;
|
||||
import mops.gruppen2.security.Account;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
@ -25,8 +19,9 @@ public class ControllerService {
|
||||
private final UserService userService;
|
||||
private final InviteLinkRepositoryService inviteLinkRepositoryService;
|
||||
|
||||
public ControllerService(EventService eventService, InviteLinkRepositoryService inviteLinkRepositoryService) {
|
||||
public ControllerService(EventService eventService, UserService userService, InviteLinkRepositoryService inviteLinkRepositoryService) {
|
||||
this.eventService = eventService;
|
||||
this.userService = userService;
|
||||
this.inviteLinkRepositoryService = inviteLinkRepositoryService;
|
||||
}
|
||||
|
||||
@ -117,9 +112,9 @@ public class ControllerService {
|
||||
public void deleteGroupEvent(User user, Long group_id) {
|
||||
DeleteGroupEvent deleteGroupEvent = new DeleteGroupEvent(group_id, user.getUser_id());
|
||||
eventService.saveEvent(deleteGroupEvent);
|
||||
}
|
||||
|
||||
|
||||
public void createLecture(Account account, String title, String description, Boolean visibility, List<User> users) {
|
||||
public void createLecture(Account account, String title, String description, Boolean visibility, List<User> users) throws EventException {
|
||||
Visibility visibility1;
|
||||
Long group_id = eventService.checkGroup();
|
||||
|
||||
@ -135,7 +130,7 @@ public class ControllerService {
|
||||
addUser(account, group_id);
|
||||
updateTitle(account, group_id, title);
|
||||
updateDescription(account, group_id, description);
|
||||
updateRole(account, group_id);
|
||||
updateRole(account.getName(), group_id);
|
||||
addUserList(users, group_id);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user