Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedsalem401 committed Dec 15, 2023
1 parent 7f5a4e4 commit d97a9a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/indexFolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function indexFolder(
if (!result.success) {
const error: ZodError = (result as any).error;

error.errors.forEach((err) => {
error.errors.forEach((err: any) => {
const errorMessage = `Error: In ${
fileObject.file_path
} for the ${documentType} schema. \n In "${err.path.join(
Expand Down
3 changes: 3 additions & 0 deletions src/lib/markdowndb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ export class MarkdownDB {

private async saveDataToDisk(fileObjects: FileInfo[]) {
await resetDatabaseTables(this.db);
const properties = getUniqueProperties(fileObjects);
MddbFile.deleteTable(this.db);
await MddbFile.createTable(this.db, properties);

const filesToInsert = fileObjects.map(mapFileToInsert);
const uniqueTags = getUniqueValues(
Expand Down

0 comments on commit d97a9a6

Please sign in to comment.