fix: update merge/get secret change request to reflect granular update changes, update change request UI to properly display state, and remove secret value setting on overview rename mutation

This commit is contained in:
Scott Wilson
2025-09-22 16:41:28 -07:00
parent a1dc9ec78f
commit ed4414c456
7 changed files with 92 additions and 24 deletions
+6 -2
View File
@@ -16,8 +16,12 @@ export const stripUndefinedInWhere = <T extends object>(val: T): Exclude<T, unde
// if its undefined its skipped in knex
// if its empty string its set as null
// else pass to the required one
export const setKnexStringValue = <T>(value: string | null | undefined, cb: (arg: string) => T) => {
export const setKnexStringValue = <T>(
value: string | null | undefined,
cb: (arg: string) => T,
allowEmptyString?: boolean
) => {
if (typeof value === "undefined") return;
if (value === "" || value === null) return null;
if ((value === "" && !allowEmptyString) || value === null) return null;
return cb(value);
};