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')
resin = require('../resin')
messages = require('../messages/messages')
exports.failIfNotLoggedIn = (fn, onError) ->
return ->
@ -8,7 +7,7 @@ exports.failIfNotLoggedIn = (fn, onError) ->
resin.auth.isLoggedIn (isLoggedIn) ->
if not isLoggedIn
error = new Error(messages.errors.loginRequired)
error = new Error('You have to log in')
if onError?
return onError(error)
else

View File

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