chore(backend): Fix linter warnings in backend code
This commit is contained in:
parent
21129f6474
commit
1c95f8ed34
3 changed files with 2 additions and 6 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue