Add new commit logic on every folder/secret operation

This commit is contained in:
carlosmonastyrski
2025-05-06 18:57:25 -03:00
parent 32a3e1d200
commit f493a617b1
32 changed files with 675 additions and 140 deletions
@@ -8,7 +8,8 @@ import { ormify, selectAllTableCols } from "@app/lib/knex";
export type TFolderCommitDALFactory = ReturnType<typeof folderCommitDALFactory>;
export const folderCommitDALFactory = (db: TDbClient) => {
const folderCommitOrm = ormify<TFolderCommits>(db, TableName.FolderCommit);
const folderCommitOrm = ormify(db, TableName.FolderCommit);
const { delete: deleteOp, deleteById, ...restOfOrm } = folderCommitOrm;
const findByFolderId = async (folderId: string, tx?: Knex): Promise<TFolderCommits[]> => {
try {
@@ -48,7 +49,7 @@ export const folderCommitDALFactory = (db: TDbClient) => {
};
return {
...folderCommitOrm,
...restOfOrm,
findByFolderId,
findById,
findLatestCommit