More lint

This commit is contained in:
Fang-Pen Lin
2025-11-04 16:57:07 -08:00
parent cb2810b263
commit 62dbd3248a
2 changed files with 10 additions and 8 deletions

View File

@@ -36,7 +36,7 @@ export const registerPkiAcmeRouter = async (server: FastifyZodProvider) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
R extends FastifyRequest<any>,
TSchema extends z.ZodSchema<unknown> | undefined = undefined,
T = TSchema extends z.ZodSchema<infer R> ? R : string
T = TSchema extends z.ZodSchema<infer U> ? U : string
>({
req,
schema
@@ -71,7 +71,7 @@ export const registerPkiAcmeRouter = async (server: FastifyZodProvider) => {
if (!strBody) {
done(null, undefined);
}
const json = JSON.parse(strBody);
const json: unknown = JSON.parse(strBody);
done(null, json);
} catch (err) {
const error = err as Error;

View File

@@ -35,8 +35,9 @@ export const pkiAcmeChallengeDALFactory = (db: TDbClient) => {
);
// Update status for pending orders that have all auths valid
await (tx || db)(TableName.PkiAcmeOrder)
.whereIn("id", (qb) => {
qb.select("o2.id")
.whereIn("id", async (qb) => {
void (await qb
.select("o2.id")
.from({ o2: TableName.PkiAcmeOrder })
.join({ oa2: TableName.PkiAcmeOrderAuth }, "o2.id", "oa2.orderId")
.join({ a2: TableName.PkiAcmeAuth }, "oa2.authId", "a2.id")
@@ -47,7 +48,7 @@ export const pkiAcmeChallengeDALFactory = (db: TDbClient) => {
])
// Only update orders that are pending
.where("o2.status", AcmeOrderStatus.Pending)
.whereIn("o2.id", involvedOrderIds);
.whereIn("o2.id", involvedOrderIds));
})
.update({ status: AcmeOrderStatus.Ready });
}
@@ -74,8 +75,9 @@ export const pkiAcmeChallengeDALFactory = (db: TDbClient) => {
if (updatedAuths.length > 0) {
// Update status for pending orders that have all auths valid
await (tx || db)(TableName.PkiAcmeOrder)
.whereIn("id", (qb) => {
qb.select("o.id")
.whereIn("id", async (qb) => {
void (await qb
.select("o.id")
.from({ o: TableName.PkiAcmeOrder })
.join(TableName.PkiAcmeOrderAuth, "o.id", `${TableName.PkiAcmeOrderAuth}.orderId`)
.join(TableName.PkiAcmeAuth, `${TableName.PkiAcmeOrderAuth}.authId`, `${TableName.PkiAcmeAuth}.id`)
@@ -84,7 +86,7 @@ export const pkiAcmeChallengeDALFactory = (db: TDbClient) => {
.whereIn(
`${TableName.PkiAcmeAuth}.id`,
updatedAuths.map((auth) => auth.id)
);
));
})
.update({ status: AcmeOrderStatus.Invalid });
}