fix
This commit is contained in:
parent
1ee64cfab4
commit
a07251c76e
|
|
@ -5,12 +5,13 @@ export const softDeleteFilter = (
|
||||||
type: "boolean" | "nullable";
|
type: "boolean" | "nullable";
|
||||||
}
|
}
|
||||||
) => {
|
) => {
|
||||||
console.log({where})
|
console.log({ where });
|
||||||
const defaultParam = typeof where === "object" ? where : {}
|
const defaultParam = typeof where === "object" ? where : {};
|
||||||
const result = {
|
const result = {
|
||||||
AND: [
|
AND: [
|
||||||
typeof where === "object" ? { ...defaultParam },
|
typeof where === "object"
|
||||||
{
|
? { ...defaultParam }
|
||||||
|
: {
|
||||||
[soft.field]:
|
[soft.field]:
|
||||||
soft.type === "boolean"
|
soft.type === "boolean"
|
||||||
? true
|
? true
|
||||||
|
|
@ -18,8 +19,8 @@ export const softDeleteFilter = (
|
||||||
not: null,
|
not: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
};
|
||||||
console.log(result)
|
console.log(result);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue