From 9e7a85f400faa4f61e4d266d6ae295b989720798 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Tue, 23 Jul 2024 00:15:12 +0200 Subject: [PATCH] Fix linting --- src/controller/projects.ts | 6 +++--- src/controller/validation.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/controller/projects.ts b/src/controller/projects.ts index 0ccf2ce..df54654 100644 --- a/src/controller/projects.ts +++ b/src/controller/projects.ts @@ -66,9 +66,9 @@ export const getProjectUnsafe = async (projectId: string): Promise { - return new Promise((resolve, reject) => generateKeyPair('rsa', { - modulusLength: 4096, publicKeyEncoding: {type: 'spki', format: 'pem'}, - privateKeyEncoding: {type: 'pkcs8', format: 'pem'} + return new Promise((resolve, reject) => generateKeyPair("rsa", { + modulusLength: 4096, publicKeyEncoding: {type: "spki", format: "pem"}, + privateKeyEncoding: {type: "pkcs8", format: "pem"} }, async (err, publicKey, privateKey) => { if (err) return reject({code: 5000, message: "An error occurred while generating the key pair"}); diff --git a/src/controller/validation.ts b/src/controller/validation.ts index c587039..29ac34f 100644 --- a/src/controller/validation.ts +++ b/src/controller/validation.ts @@ -60,7 +60,7 @@ export const signOfflineKey = async (validationKey: string, licenseKey: string) const signature = signer.sign(project.privateKey, "hex"); let content = JSON.stringify({signature, data: {...license.license, renewalDate}}); - content = Buffer.from(content).toString('base64').replace(/(.{64})/g, "$1\n"); + content = Buffer.from(content).toString("base64").replace(/(.{64})/g, "$1\n"); const file = `-----BEGIN LICENSE KEY-----\n${content}\n-----END LICENSE KEY-----`;