fix repository's findOne to allow offset and sort – fixes module manager's config retrieval

This commit is contained in:
dswbx
2024-12-05 10:37:05 +01:00
parent a3348122e6
commit 77a6b6e7f5
4 changed files with 73 additions and 19 deletions

View File

@@ -72,10 +72,10 @@ export class TypeInvalidError extends Error {
}
}
export function stripMark(obj: any) {
export function stripMark<O = any>(obj: O) {
const newObj = cloneDeep(obj);
mark(newObj, false);
return newObj;
return newObj as O;
}
export function mark(obj: any, validated = true) {