Skip to content

Commit 7f95015

Browse files
committed
fix linting errors
1 parent 263c1aa commit 7f95015

9 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ const apiVersions = fs.readdirSync(`${__dirname}/api-docs`)
5656
for (const version of apiVersions) {
5757
const swaggerDocument = require(`./api-docs/${version}/swagger.json`)
5858
app.use(`/${version}/api-docs`, apiLimiter, swaggerUi.serve, (req, res) => {
59-
let html = swaggerUi.generateHTML(swaggerDocument);
60-
res.send(html);
59+
let html = swaggerUi.generateHTML(swaggerDocument, swaggerOptions)
60+
res.send(html)
6161
})
6262
}
6363

src/routes/v1/user-role.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ router.post('/delete', async (req, res) => {
8484
if (removed) {
8585
response.setMessage('Policy deleted')
8686
} else {
87-
response.setCode(422)
87+
response.setCode(422)
8888
response.setMessage('Request inconsistent with existing casbin policy')
8989
}
9090
} else {

src/routes/v1/user.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,17 @@ router.post('/', utils.authMiddleware, async (req, res) => {
156156

157157
}else {
158158
response.setCode(400)
159-
response.setMessage("Password invalid. Must be at least 8 characters long and contain at least 1 of the following: uppercase letter, lowercase letter, special character, and decimal digit.")
159+
response.setMessage('Password invalid. Must be at least 8 characters long and contain at least 1 of the following: uppercase letter, lowercase letter, special character, and decimal digit.')
160160
}
161161
} else {
162162
response.setCode(400)
163-
response.setMessage("Email not in valid format.")
163+
response.setMessage('Email not in valid format.')
164164
}
165165
} catch (e) {
166-
if (e.name === "SequelizeUniqueConstraintError"){
166+
if (e.name === 'SequelizeUniqueConstraintError'){
167167
console.error(e)
168168
response.setCode(500)
169-
response.setMessage("Email already in dataset and cannot be created.")
169+
response.setMessage('Email already in dataset and cannot be created.')
170170
}else{
171171
console.error(e)
172172
response.setCode(500)

src/tests/v1/contact.routes.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import uuid from 'uuid4'
55
import { Login } from '../../utils/login'
66
import app from '../..'
77

8-
const VERSION = '1';
8+
const VERSION = '1'
99
const { expect } = chai
1010
const contact = {
1111
name: randomWords(),

src/tests/v1/csv.routes.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import request from 'supertest'
33
import { Login } from '../../utils/login'
44
import app from '../..'
55

6-
const VERSION = '1';
6+
const VERSION = '1'
77
describe('CSV Dump Negative Tests', function() {
88
const authed = new Login(VERSION)
99
let token

src/tests/v1/entity.routes.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import uuid from 'uuid4'
55
import { Login } from '../../utils/login'
66
import app from '../..'
77

8-
const VERSION = '1';
8+
const VERSION = '1'
99
const { expect } = chai
1010
const entity = {
1111
name: randomWords(),

src/tests/v1/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import chai from 'chai'
22
import request from 'supertest'
33
import app from '../..'
44

5-
const VERSION = '1';
5+
const VERSION = '1'
66
const {expect} = chai
77

88
describe('API Integration Tests', function() {

src/tests/v1/user.routes.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import randomWords from 'random-words'
44
import { Login } from '../../utils/login'
55
import app from '../..'
66

7-
const VERSION = '1';
7+
const VERSION = '1'
88
const { expect } = chai
99
const user = { email: `${randomWords()}@test.test`, password: 'Abcdefg42!', roles: ['admin'] }
1010

src/tests/v1/userRole.routes.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import request from 'supertest'
33
import { Login } from '../../utils/login'
44
import app from '../..'
55

6-
const VERSION = '1';
6+
const VERSION = '1'
77
const { expect, assert } = chai
88
const role = { role: 'test' + Date.now(), path: '/test', method: 'GET' }
99

0 commit comments

Comments
 (0)