ore-fol-filters
v1.0.0
Published
Filters for ore-fol
Downloads
3
Readme
ore-fol-filters
Filters for ore-fol
Installation
$ npm install ore-fol-filters --save
Usage
'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.