1.0.0 • Published 9 years ago
ore-fol-filters v1.0.0
ore-fol-filters
Filters for ore-fol
Installation
$ npm install ore-fol-filters --saveUsage
'use strict'
const { onlyAdminFilter } = require('ore-fol-filters')
function koaHandler (ctx) {
ctx.onlyAdmin = onlyAdminFilter(ctx)
/* ... */
ctx.onlyAdmin(() => new Promise((resolve, reject) => {
// DO something for admin
}))
}Functions
Available functions
| Signature | Description |
|---|---|
onlyAdminFilter() | Define only signed filter |
onlySignedFilter() | Define only signed filter |
License
This software is released under the MIT License.
Links
1.0.0
9 years ago