restore things lost in merge ffs
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user