Browse Source

minor step towards loading times

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
feature/brute_force_protection
Stephan Richter 3 months ago
parent
commit
c991224d74
  1. 8
      time/src/main/java/de/srsoftware/umbrella/time/TimeModule.java

8
time/src/main/java/de/srsoftware/umbrella/time/TimeModule.java

@ -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);
}
/*

Loading…
Cancel
Save