|
|
|
|
@ -4,6 +4,8 @@ package de.srsoftware.umbrella.time;
@@ -4,6 +4,8 @@ package de.srsoftware.umbrella.time;
|
|
|
|
|
import static de.srsoftware.umbrella.core.ConnectionProvider.connect; |
|
|
|
|
import static de.srsoftware.umbrella.core.Constants.*; |
|
|
|
|
import static de.srsoftware.umbrella.core.Paths.LIST; |
|
|
|
|
import static de.srsoftware.umbrella.core.ResponseCode.HTTP_NOT_IMPLEMENTED; |
|
|
|
|
import static de.srsoftware.umbrella.core.Util.mapValues; |
|
|
|
|
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.forbidden; |
|
|
|
|
import static de.srsoftware.umbrella.core.exceptions.UmbrellaException.missingFieldException; |
|
|
|
|
import static de.srsoftware.umbrella.time.Constants.*; |
|
|
|
|
@ -28,6 +30,7 @@ public class TimeModule extends BaseHandler implements TimeService {
@@ -28,6 +30,7 @@ public class TimeModule extends BaseHandler implements TimeService {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final Collection<Task> tasks; |
|
|
|
|
|
|
|
|
|
public ExtendedTime(long id, long userId, String subject, String description, LocalDateTime start, LocalDateTime end, State state, Collection<Task> tasks) { |
|
|
|
|
super(id, userId, subject, description, start, end, state, tasks.stream().map(Task::id).toList()); |
|
|
|
|
this.tasks = tasks; |
|
|
|
|
@ -79,8 +82,11 @@ public class TimeModule extends BaseHandler implements TimeService {
@@ -79,8 +82,11 @@ public class TimeModule extends BaseHandler implements TimeService {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean getUserTimes(UmbrellaUser user, HttpExchange ex) { |
|
|
|
|
private boolean getUserTimes(UmbrellaUser user, HttpExchange ex) throws IOException { |
|
|
|
|
// TODO
|
|
|
|
|
Map<Long, Project> projects = registry.projectService().listUserProjects(user.id(), true); |
|
|
|
|
//timeDb.
|
|
|
|
|
return sendEmptyResponse(HTTP_NOT_IMPLEMENTED,ex); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|