mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 14:26:25 +00:00
More linter
This commit is contained in:
@@ -44,7 +44,7 @@ export const registerPkiAcmeRouter = async (server: FastifyZodProvider) => {
|
|||||||
req: R;
|
req: R;
|
||||||
schema?: TSchema;
|
schema?: TSchema;
|
||||||
}): Promise<TAuthenciatedJwsPayload<T>> => {
|
}): Promise<TAuthenciatedJwsPayload<T>> => {
|
||||||
return await server.services.pkiAcme.validateExistingAccountJwsPayload({
|
return server.services.pkiAcme.validateExistingAccountJwsPayload({
|
||||||
url: new URL(req.url, `${req.protocol}://${req.hostname}`),
|
url: new URL(req.url, `${req.protocol}://${req.hostname}`),
|
||||||
profileId: (req.params as { profileId: string }).profileId,
|
profileId: (req.params as { profileId: string }).profileId,
|
||||||
rawJwsPayload: req.body as TRawJwsPayload,
|
rawJwsPayload: req.body as TRawJwsPayload,
|
||||||
@@ -71,7 +71,7 @@ export const registerPkiAcmeRouter = async (server: FastifyZodProvider) => {
|
|||||||
if (!strBody) {
|
if (!strBody) {
|
||||||
done(null, undefined);
|
done(null, undefined);
|
||||||
}
|
}
|
||||||
const json = JSON.parse(strBody as string);
|
const json = JSON.parse(strBody);
|
||||||
done(null, json);
|
done(null, json);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const error = err as Error;
|
const error = err as Error;
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ export const pkiAcmeChallengeServiceFactory = ({
|
|||||||
} else if (cause instanceof Error) {
|
} else if (cause instanceof Error) {
|
||||||
errors = [cause];
|
errors = [cause];
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line no-unreachable-loop
|
||||||
for (const err of errors) {
|
for (const err of errors) {
|
||||||
// TODO: handle multiple errors, return a compound error instead of just the first error
|
// TODO: handle multiple errors, return a compound error instead of just the first error
|
||||||
const fetchError = err as FetchError;
|
const fetchError = err as FetchError;
|
||||||
|
|||||||
Reference in New Issue
Block a user