display parking system in system resolver and remove unnecessary test

This commit is contained in:
2025-04-16 17:06:09 -07:00
parent 544cab5324
commit dd1a448160
2 changed files with 13 additions and 12 deletions

View File

@@ -78,5 +78,18 @@ export const SystemResolvers: Resolvers<ServerContext> = {
return await system.shuttleRepository.getShuttles();
},
parkingSystem: async (parent, _args, contextValue, _info) => {
const system = contextValue.findSystemById(parent.id);
if (!system) {
return null;
}
const parkingRepository = system.parkingRepository;
if (!parkingRepository) return null;
return {
systemId: parent.id,
};
},
},
}