From 27ed47d89e25c566210fb1f2bef38070cd44cebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elli=20H=C3=A4hnel?= Date: Thu, 29 Feb 2024 13:04:05 +0100 Subject: [PATCH] change cutoff values in ListMeals conditions --- server/backend/cafeteria.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/backend/cafeteria.go b/server/backend/cafeteria.go index 406f717a..798830b2 100644 --- a/server/backend/cafeteria.go +++ b/server/backend/cafeteria.go @@ -644,11 +644,11 @@ func (s *CampusServer) ListMeals(ctx context.Context, req *pb.ListMealsRequest) if req.Year < 2022 { return &pb.ListMealsReply{}, status.Error(codes.Internal, "Years must be larger or equal to 2022 ") // currently, no previous values have been added } - if req.Week < 1 || req.Week > 53 { - return &pb.ListMealsReply{}, status.Error(codes.Internal, "Weeks must be in the range 1 - 53") + if req.Week < 1 || req.Week > 52 { + return &pb.ListMealsReply{}, status.Error(codes.Internal, "Weeks must be in the range 1 - 52") } if req.Day < 0 || req.Day > 4 { - return &pb.ListMealsReply{}, status.Error(codes.Internal, "Days must be in the range 1 (Monday) - 4 (Friday)") + return &pb.ListMealsReply{}, status.Error(codes.Internal, "Days must be in the range 0 (Monday) - 4 (Friday)") } var requestStatus error = nil