mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-30 10:38:50 +00:00
Get rid of messages module
This commit is contained in:
parent
3db13f6329
commit
912ebf6752
@ -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
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
module.exports =
|
|
||||||
|
|
||||||
errors:
|
|
||||||
loginRequired: 'You have to log in'
|
|
Loading…
Reference in New Issue
Block a user