Fix linting

This commit is contained in:
Mathias Wagner
2024-07-23 00:15:12 +02:00
parent b547e3054b
commit 9e7a85f400
2 changed files with 4 additions and 4 deletions

View File

@ -66,9 +66,9 @@ export const getProjectUnsafe = async (projectId: string): Promise<IProject | nu
}
export const createProject = (name: string, userId: string) => {
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"});

View File

@ -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-----`;