Skip to content

Commit

Permalink
change FZ limit to 10 years
Browse files Browse the repository at this point in the history
  • Loading branch information
mathe42 committed Jun 27, 2022
1 parent 41d3233 commit 6fd01d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ const ecKreis = new GraphQLObjectType({
type: new GraphQLList(person),
resolve(val: { ecKreisID: number }) {
return query(
`SELECT * FROM personen WHERE personen.ecKreis = ${val.ecKreisID} AND (EXISTS (SELECT * FROM fzAntrag WHERE fzAntrag.personID = personen.personID) OR EXISTS (SELECT * FROM fz WHERE fz.personID = personen.personID AND fz.fzVon > (DATE_SUB(NOW(), INTERVAL 7 YEAR))))`
`SELECT * FROM personen WHERE personen.ecKreis = ${val.ecKreisID} AND (EXISTS (SELECT * FROM fzAntrag WHERE fzAntrag.personID = personen.personID) OR EXISTS (SELECT * FROM fz WHERE fz.personID = personen.personID AND fz.fzVon > (DATE_SUB(NOW(), INTERVAL 10 YEAR))))`
)
}
}
Expand Down Expand Up @@ -1022,7 +1022,7 @@ export const schema = new GraphQLSchema({
type: new GraphQLList(person),
resolve: handleAuth(() =>
query(
`SELECT * FROM personen WHERE EXISTS (SELECT * FROM fzAntrag WHERE fzAntrag.personID = personen.personID) OR EXISTS (SELECT * FROM fz WHERE fz.personID = personen.personID AND fz.fzVon > (DATE_SUB(NOW(), INTERVAL 7 YEAR)))`
`SELECT * FROM personen WHERE EXISTS (SELECT * FROM fzAntrag WHERE fzAntrag.personID = personen.personID) OR EXISTS (SELECT * FROM fz WHERE fz.personID = personen.personID AND fz.fzVon > (DATE_SUB(NOW(), INTERVAL 10 YEAR)))`
)
)
},
Expand Down

0 comments on commit 6fd01d3

Please sign in to comment.