fix(don): dont conflict
Build and Push Image / build-backend (push) Successful in 19s
Build and Push Image / build-frontend (push) Successful in 1m14s
Build and Push Image / push (push) Successful in 47s

This commit is contained in:
2026-06-10 16:27:04 +07:00 Unverified
parent 03f2f941a3
commit bb8e8c8ee1
+13 -12
View File
@@ -201,7 +201,8 @@ export default async function () {
})
.returning({ id: donations.id });
if ($.artifact === "true") {
const res = await tx
// const res = await tx
await tx
.insert(submissions)
.values({
name,
@@ -215,17 +216,17 @@ export default async function () {
// queue: null as unknown as undefined,
// },
// })
.onConflictDoNothing()
.catch(() => "conflict");
if (res === "conflict") {
tx.rollback();
ph.capture({
distinctId,
event: "donation_artifact_conflict",
properties: { amount: $.amount, uid: $.uid },
});
return { error: { where: "uid", what: "ไม่สามารถสร้างคิวลัดได้" } };
}
.onConflictDoNothing();
// .catch(() => "conflict");
// if (res === "conflict") {
// tx.rollback();
// ph.capture({
// distinctId,
// event: "donation_artifact_conflict",
// properties: { amount: $.amount, uid: $.uid },
// });
// return { error: { where: "uid", what: "ไม่สามารถสร้างคิวลัดได้" } };
// }
}
if ($.amount >= 10)
sse.donate.pub("ping", {