Skip to content

Commit

Permalink
Only sync pins and SSH keys that have not expired
Browse files Browse the repository at this point in the history
  • Loading branch information
elsbrock committed Sep 9, 2014
1 parent 269b132 commit cc3cfae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion BenutzerDB/lib/RaumZeitLabor/BenutzerDB.pm
Expand Up @@ -298,7 +298,8 @@ get '/BenutzerDB/sshkeys/:what' => sub {
sshpubkeys AS k LEFT JOIN
nutzer AS n ON k.handle = n.handle
WHERE
n.pin IS NOT NULL|
n.pin IS NOT NULL
AND (n.pin_expiry IS NULL OR n.pin_expiry > NOW())|
, { Slice => {} });

return to_json $keys;
Expand Down Expand Up @@ -329,6 +330,7 @@ get '/BenutzerDB/pins/:what' => sub {
FROM
nutzer
WHERE pin IS NOT NULL
AND (pin_expiry IS NULL OR pin_expiry > NOW())
ORDER BY id ASC|,
{ Slice => {} });

Expand Down

0 comments on commit cc3cfae

Please sign in to comment.