feat: fixed eslint and resolved all eslint issues

This commit is contained in:
Akhil Mohan
2024-01-30 22:30:42 +05:30
parent 7c4dd5000f
commit 5855cc660a
147 changed files with 1165 additions and 938 deletions
+2 -2
View File
@@ -74,10 +74,10 @@ export const webhookDALFactory = (db: TDbClient) => {
.where(`${TableName.Environment}.projectId`, projectId)
.where((qb) => {
if (environment) {
qb.where("slug", environment);
void qb.where("slug", environment);
}
if (secretPath) {
qb.where("secretPath", secretPath);
void qb.where("secretPath", secretPath);
}
})
.join(TableName.Environment, `${TableName.Webhook}.envId`, `${TableName.Environment}.id`)
+2 -1
View File
@@ -1,5 +1,6 @@
import crypto from "node:crypto";
import { AxiosError } from "axios";
import picomatch from "picomatch";
import { SecretKeyEncoding, TWebhooks } from "@app/db/schemas";
@@ -111,7 +112,7 @@ export const fnTriggerWebhook = async ({
.filter(({ status }) => status === "rejected")
.map((data, i) => ({
id: toBeTriggeredHooks[i].id,
error: data.status === "rejected" && data.reason.message
error: data.status === "rejected" ? (data.reason as AxiosError).message : ""
}));
await webhookDAL.transaction(async (tx) => {