UNPKG

wires-domain

Version:

Restfull service with dependency injection

15 lines (13 loc) 220 B
var domain = require('../index'); domain.service("$auth", function($req) { return { validate: function() { if (!$req.query.test) { throw { code: 404, message: "Not authorized!" } } } } });