mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 07:50:31 +00:00
fix incorrect id passed into find system method for stop resolvers
This commit is contained in:
@@ -4,14 +4,14 @@ import { ServerContext } from "../ServerContext";
|
|||||||
export const StopResolvers: Resolvers<ServerContext> = {
|
export const StopResolvers: Resolvers<ServerContext> = {
|
||||||
Stop: {
|
Stop: {
|
||||||
orderedStops: async (parent, args, contextValue, _info) => {
|
orderedStops: async (parent, args, contextValue, _info) => {
|
||||||
const system = contextValue.findSystemById(parent.id);
|
const system = contextValue.findSystemById(parent.systemId);
|
||||||
if (!system) {
|
if (!system) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
return await system.shuttleRepository.getOrderedStopsByStopId(parent.id);
|
return await system.shuttleRepository.getOrderedStopsByStopId(parent.id);
|
||||||
},
|
},
|
||||||
etas: async (parent, args, contextValue, _info) => {
|
etas: async (parent, args, contextValue, _info) => {
|
||||||
const system = contextValue.findSystemById(parent.id);
|
const system = contextValue.findSystemById(parent.systemId);
|
||||||
if (!system) {
|
if (!system) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user