-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for async firewall functions
- Loading branch information
Bero
committed
Aug 12, 2024
1 parent
ae88d68
commit da1d144
Showing
12 changed files
with
149 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 31 additions & 29 deletions
60
lib/namedQuery/testing/bootstrap/queries/postListExposure.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,41 @@ | ||
import { createQuery } from 'meteor/cultofcoders:grapher'; | ||
|
||
const postListExposure = createQuery('postListExposure', { | ||
posts: { | ||
title: 1, | ||
author: { | ||
name: 1 | ||
}, | ||
group: { | ||
name: 1 | ||
} | ||
} | ||
posts: { | ||
title: 1, | ||
author: { | ||
name: 1, | ||
}, | ||
group: { | ||
name: 1, | ||
}, | ||
}, | ||
}); | ||
|
||
export const postListFilteredWithDate = createQuery('postListFilteredWithDate', { | ||
export const postListFilteredWithDate = createQuery( | ||
'postListFilteredWithDate', | ||
{ | ||
posts: { | ||
$filter({filters, options, params}) { | ||
if (params.date) { | ||
filters.createdAt = {$lte: params.date} | ||
} | ||
}, | ||
createdAt:1, | ||
} | ||
}); | ||
$filter({ filters, options, params }) { | ||
if (params.date) { | ||
filters.createdAt = { $lte: params.date }; | ||
} | ||
}, | ||
createdAt: 1, | ||
}, | ||
}, | ||
); | ||
|
||
if (Meteor.isServer) { | ||
postListExposure.expose({ | ||
firewall(userId, params) { | ||
}, | ||
embody: { | ||
$filter({filters, params}) { | ||
filters.title = params.title | ||
} | ||
} | ||
}); | ||
postListFilteredWithDate.expose({}); | ||
postListExposure.expose({ | ||
firewall(userId, params) {}, | ||
embody: { | ||
$filter({ filters, params }) { | ||
filters.title = params.title; | ||
}, | ||
}, | ||
}); | ||
postListFilteredWithDate.expose({}); | ||
} | ||
|
||
export default postListExposure; | ||
export default postListExposure; |
Oops, something went wrong.