Get rid of messages module

This commit is contained in:
Juan Cruz Viotti 2014-11-26 13:35:01 -04:00
parent 3db13f6329
commit 912ebf6752
2 changed files with 1 additions and 6 deletions

View File

@ -1,6 +1,5 @@
_ = require('lodash') _ = require('lodash')
resin = require('../resin') resin = require('../resin')
messages = require('../messages/messages')
exports.failIfNotLoggedIn = (fn, onError) -> exports.failIfNotLoggedIn = (fn, onError) ->
return -> return ->
@ -8,7 +7,7 @@ exports.failIfNotLoggedIn = (fn, onError) ->
resin.auth.isLoggedIn (isLoggedIn) -> resin.auth.isLoggedIn (isLoggedIn) ->
if not isLoggedIn if not isLoggedIn
error = new Error(messages.errors.loginRequired) error = new Error('You have to log in')
if onError? if onError?
return onError(error) return onError(error)
else else

View File

@ -1,4 +0,0 @@
module.exports =
errors:
loginRequired: 'You have to log in'