1
0
Fork 0

chore(backend): Fix linter warnings in backend code

This commit is contained in:
joostdecock 2023-05-19 16:37:32 +02:00
parent 21129f6474
commit 1c95f8ed34
3 changed files with 2 additions and 6 deletions

View file

@ -1,6 +1,4 @@
import { PrismaClient } from '@prisma/client' import { PrismaClient } from '@prisma/client'
import { encryption } from '../src/utils/crypto.mjs'
import { verifyConfig } from '../src/config.mjs'
import { import {
cisFemaleAdult, cisFemaleAdult,
cisMaleAdult, cisMaleAdult,
@ -10,7 +8,6 @@ import {
cisMaleGiant, cisMaleGiant,
} from '../../../packages/models/src/index.mjs' } from '../../../packages/models/src/index.mjs'
const prisma = new PrismaClient() const prisma = new PrismaClient()
const config = verifyConfig()
/* /*
* Note: This will import the FreeSewing (v2) sizing table into the * Note: This will import the FreeSewing (v2) sizing table into the

View file

@ -42,8 +42,7 @@ ApikeyModel.prototype.sendResponse = async function (res) {
ApikeyModel.prototype.verify = async function (key, secret) { ApikeyModel.prototype.verify = async function (key, secret) {
await this.unguardedRead({ id: key }) await this.unguardedRead({ id: key })
const verify = await verifyPassword(secret, this.record.secret) const [valid] = verifyPassword(secret, this.record.secret)
const [valid] = verify
this.verified = valid this.verified = valid
return this return this

View file

@ -18,7 +18,7 @@ export const userTests = async (chai, config, expect, store) => {
email: 'test@freesewing.dev', email: 'test@freesewing.dev',
language: 'fr', language: 'fr',
} }
Object.keys(fields).map((key) => { Object.keys(fields).forEach((key) => {
it(`${store.icon('user')} Should not allow signup without ${key}`, (done) => { it(`${store.icon('user')} Should not allow signup without ${key}`, (done) => {
chai chai
.request(config.api) .request(config.api)