Finish server-side translations in controllers
This commit is contained in:
@@ -13,7 +13,7 @@ class TrustController extends Controller {
|
||||
*/
|
||||
async get_issue(req, res, next) {
|
||||
if ( !req.trust.has_flow() )
|
||||
return res.status(400).message('Missing trust flow data.').send()
|
||||
return res.status(400).message(req.T('auth.missing_trust_flow')).send()
|
||||
|
||||
// Check if the session already has a token for this scope
|
||||
const has_scope = req.trust.has(req.trust.flow_scope())
|
||||
@@ -28,22 +28,11 @@ class TrustController extends Controller {
|
||||
return res.page('auth:trust:grant', {
|
||||
...this.Vue.data({
|
||||
grant_code: token,
|
||||
login_message: 'Please re-authenticate to continue.',
|
||||
login_message: req.T('auth.reauth_to_continue'),
|
||||
}),
|
||||
...this.Vue.session(req)
|
||||
})
|
||||
}
|
||||
|
||||
/*async get_continue(req, res, next) {
|
||||
if ( !req.trust.has_flow() )
|
||||
return res.status(400).message('Missing trust flow data.')
|
||||
|
||||
if ( !req.trust.in_progress() )
|
||||
return res.status(401).message('No flow in progress. Please try again.')
|
||||
|
||||
req.trust.grant(req.trust.flow_scope())
|
||||
return res.redirect(req.trust.end())
|
||||
}*/
|
||||
}
|
||||
|
||||
module.exports = exports = TrustController
|
||||
|
||||
Reference in New Issue
Block a user