diff --git a/common/src/main/java/tools/simrail/backend/common/dispatchpost/SimRailDispatchPostRepository.java b/common/src/main/java/tools/simrail/backend/common/dispatchpost/SimRailDispatchPostRepository.java index fe9fc0b..d3eb5e2 100644 --- a/common/src/main/java/tools/simrail/backend/common/dispatchpost/SimRailDispatchPostRepository.java +++ b/common/src/main/java/tools/simrail/backend/common/dispatchpost/SimRailDispatchPostRepository.java @@ -50,19 +50,19 @@ public interface SimRailDispatchPostRepository extends /** * Finds a single dispatch post by the given foreign id. * - * @param id the foreign id of the dispatch post to get. - * @param serverCode the server code of the server to get the dispatch post on. + * @param id the foreign id of the dispatch post to get. + * @param serverId the server id of the server to get the dispatch post on. * @return an optional holding the dispatch post entity if an entity with the given foreign id exists. */ @Nonnull - Optional findByForeignIdAndServerCode(@Nonnull String id, @Nonnull String serverCode); + Optional findByForeignIdAndServerId(@Nonnull String id, @Nonnull UUID serverId); /** * Finds all dispatch post entities for the given server code. * - * @param serverCode the code of the server to get the dispatch posts of. + * @param serverId the id of the server to get the dispatch posts of. * @return all dispatch posts that are registered for the given server code. */ @Nonnull - List findAllByServerCode(@Nonnull String serverCode); + List findAllByServerId(@Nonnull UUID serverId); } diff --git a/info-collector/src/main/java/tools/simrail/backend/collector/dispatchpost/SimRailDispatchPostCollector.java b/info-collector/src/main/java/tools/simrail/backend/collector/dispatchpost/SimRailDispatchPostCollector.java index 5da366e..5d4b4c1 100644 --- a/info-collector/src/main/java/tools/simrail/backend/collector/dispatchpost/SimRailDispatchPostCollector.java +++ b/info-collector/src/main/java/tools/simrail/backend/collector/dispatchpost/SimRailDispatchPostCollector.java @@ -84,7 +84,7 @@ public void collectDispatchPostInformation() { } // - var registeredDispatchPostsByForeignId = this.dispatchPostRepository.findAllByServerCode(server.code()) + var registeredDispatchPostsByForeignId = this.dispatchPostRepository.findAllByServerId(server.id()) .stream() .collect(Collectors.toMap(SimRailDispatchPostEntity::getForeignId, Function.identity())); for (var dispatchPost : dispatchPosts) {