RHeactorJS/server

View on GitHub
src/api/route/token.js

Summary

Maintainability
A
2 hrs
Test Coverage

Function tokenRoutes has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const tokenRoutes = (app, config, tokenAuth, jsonld, sendHttpProblem) => {
  app.post('/api/token/verify', (req, res) => Promise
    .try(() => {
      const match = req.headers.authorization && req.headers.authorization.match(/^Bearer (.+)/)
      if (!match[1]) return res.status(400).send()
Severity: Major
Found in src/api/route/token.js - About 2 hrs to fix

    There are no issues that match your filters.

    Category
    Status