Add synchronization support for guidelines and AI guidelines

- Implemented syncing for `GuideLine` and `AIGuideLine` entities with encryption and decryption workflows.
- Refined `GuidelineRepo` methods to check existence and update/insert records for both guideline types.
- Updated timestamp handling in `GuideLine` and `AIGuideLine` models for accurate tracking.
- Corrected QuillSense localization keys for labels and descriptions.
- Improved database queries and modularized logic for consistency.
This commit is contained in:
natreex
2026-01-14 09:17:56 -05:00
parent 707da73551
commit fc42269c8c
5 changed files with 183 additions and 52 deletions

View File

@@ -174,10 +174,8 @@ export default class Act {
for (const chapter of mainChapters) {
const chapterId: string = chapter.chapterId;
const chapterTitle: string = chapter.title;
const hashedChapterTitle: string = System.hashElement(chapterTitle);
const encryptedChapterTitle: string = System.encryptDataWithUserKey(chapterTitle, userEncryptionKey);
const chapterOrder: number = chapter.chapterOrder;
ChapterRepo.updateChapter(userId, chapterId, encryptedChapterTitle, hashedChapterTitle, chapterOrder, System.timeStampInSeconds(), lang);
Chapter.updateChapter(userId, chapterId, chapterTitle, chapterOrder, lang);
}
return true;