mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-06-08 07:15:15 -04:00
Update api packages
This commit is contained in:
+6
-1
@@ -148,8 +148,13 @@ export const jsonbBuildObject = <T>(select: JsonFields) => {
|
||||
};
|
||||
|
||||
export const isUniqueConstraint = (e: unknown): boolean => {
|
||||
if (typeof e !== "object" || !e || !("cause" in e)) return false;
|
||||
const cause = e.cause;
|
||||
return (
|
||||
typeof e === "object" && e != null && "code" in e && e.code === "23505"
|
||||
typeof cause === "object" &&
|
||||
cause != null &&
|
||||
"code" in cause &&
|
||||
cause.code === "23505"
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user