mirror of
https://github.com/brendan-ch/project-inter-server.git
synced 2026-04-17 16:00:32 +00:00
rename repository to server repository in server context
This commit is contained in:
@@ -8,14 +8,14 @@ import { ScheduledNotification } from "../repositories/NotificationRepository";
|
||||
export const MutationResolvers: Resolvers<ServerContext> = {
|
||||
Mutation: {
|
||||
scheduleNotification: async (_parent, args, context, _info) => {
|
||||
const shuttle = await context.repository.getShuttleById(args.input.shuttleId);
|
||||
const shuttle = await context.shuttleRepository.getShuttleById(args.input.shuttleId);
|
||||
if (!shuttle) {
|
||||
return {
|
||||
message: "Shuttle ID doesn't exist",
|
||||
success: false,
|
||||
}
|
||||
}
|
||||
const stop = await context.repository.getStopById(args.input.stopId);
|
||||
const stop = await context.shuttleRepository.getStopById(args.input.stopId);
|
||||
if (!stop) {
|
||||
return {
|
||||
message: "Stop ID doesn't exist",
|
||||
|
||||
Reference in New Issue
Block a user