UNPKG

whistle.nohost

Version:

Nohost plugin for whistle

15 lines (13 loc) 311 B
const { checkLogin } = require('../../../util'); module.exports = async (ctx, next) => { const { username, password } = ctx.admin; const accept = checkLogin(ctx, { username, password, nameKey: 'nohost_admin_name', authKey: 'nohost_admin_key', }); if (accept) { await next(); } };