1

restore things lost in merge ffs

This commit is contained in:
Christoph
2020-03-10 13:34:19 +01:00
parent c7d5e02f0b
commit 73e7737b8c
4 changed files with 33 additions and 25 deletions

View File

@ -1,12 +1,10 @@
package mops.gruppen2.controller;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.github.javafaker.Faker;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import mops.gruppen2.domain.ProductSwaggerExample;
import mops.gruppen2.domain.event.AddUserEvent;
import mops.gruppen2.service.SerializationService;
import org.springframework.web.bind.annotation.*;
@ -24,7 +22,7 @@ public class SwaggerAPIController {
private final List<ProductSwaggerExample> products = new ArrayList<>();
private final SerializationService serializationService;
public SwaggerAPIControllerExample(SerializationService serializationService) {
public SwaggerAPIController(SerializationService serializationService) {
this.serializationService = serializationService;
}

View File

@ -2,6 +2,7 @@ package mops.gruppen2.service;
import mops.gruppen2.domain.Exceptions.EventException;
import mops.gruppen2.domain.Group;
import mops.gruppen2.domain.event.CreateGroupEvent;
import mops.gruppen2.domain.event.Event;
import org.springframework.stereotype.Service;
@ -29,4 +30,16 @@ public class GroupService {
return newGroup;
}
public Group buildGroupFromEvent(CreateGroupEvent createGroupEvent) {
Group newGroup = new Group();
try {
newGroup.applyEvent(createGroupEvent);
} catch (EventException e) {
e.printStackTrace();
}
return newGroup;
}
}