mirror of
https://github.com/zadam/trilium.git
synced 2026-01-23 06:54:28 +01:00
Revert "feat(etapi): resolve suggestions for norms from gemini"
This reverts commit 0650be664d99858a55f476d92bf08dc99e2bad35.
This commit is contained in:
parent
0650be664d
commit
280697f2f7
@ -446,16 +446,15 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/EntityId"
|
||||
get:
|
||||
description: Returns revision content identified by its ID. The Content-Type header will match the revision's MIME type.
|
||||
description: Returns revision content identified by its ID
|
||||
operationId: getRevisionContent
|
||||
responses:
|
||||
"200":
|
||||
description: Revision content. The Content-Type header will be set to the revision's actual MIME type (e.g., text/html, text/plain, image/png).
|
||||
description: revision content response
|
||||
content:
|
||||
application/octet-stream:
|
||||
text/html:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
@ -1380,16 +1379,16 @@ components:
|
||||
title:
|
||||
type: string
|
||||
description: Title at the time of the change (may be "[protected]" for protected notes)
|
||||
currentTitle:
|
||||
current_title:
|
||||
type: string
|
||||
description: Current title of the note (may be "[protected]" for protected notes)
|
||||
currentIsDeleted:
|
||||
current_isDeleted:
|
||||
type: boolean
|
||||
description: Whether the note is currently deleted
|
||||
currentDeleteId:
|
||||
current_deleteId:
|
||||
type: string
|
||||
description: Delete ID if the note is deleted
|
||||
currentIsProtected:
|
||||
current_isProtected:
|
||||
type: boolean
|
||||
description: Whether the note is protected
|
||||
utcDate:
|
||||
|
||||
@ -42,8 +42,8 @@ describe("etapi/note-history", () => {
|
||||
expect(entry).toHaveProperty("title");
|
||||
expect(entry).toHaveProperty("utcDate");
|
||||
expect(entry).toHaveProperty("date");
|
||||
expect(entry).toHaveProperty("currentIsDeleted");
|
||||
expect(entry).toHaveProperty("currentIsProtected");
|
||||
expect(entry).toHaveProperty("current_isDeleted");
|
||||
expect(entry).toHaveProperty("current_isProtected");
|
||||
});
|
||||
|
||||
it("filters history by ancestor note", async () => {
|
||||
@ -83,7 +83,7 @@ describe("etapi/note-history", () => {
|
||||
.expect(200);
|
||||
|
||||
const deletedEntry = response.body.find(
|
||||
(entry: any) => entry.noteId === noteToDeleteId && entry.currentIsDeleted === true
|
||||
(entry: any) => entry.noteId === noteToDeleteId && entry.current_isDeleted === true
|
||||
);
|
||||
|
||||
// Deleted entries should have canBeUndeleted property
|
||||
|
||||
@ -21,10 +21,10 @@ function register(router: Router) {
|
||||
recentChanges = sql.getRows<RecentChangeRow>(`
|
||||
SELECT
|
||||
notes.noteId,
|
||||
notes.isDeleted AS currentIsDeleted,
|
||||
notes.deleteId AS currentDeleteId,
|
||||
notes.title AS currentTitle,
|
||||
notes.isProtected AS currentIsProtected,
|
||||
notes.isDeleted AS current_isDeleted,
|
||||
notes.deleteId AS current_deleteId,
|
||||
notes.title AS current_title,
|
||||
notes.isProtected AS current_isProtected,
|
||||
revisions.title,
|
||||
revisions.utcDateCreated AS utcDate,
|
||||
revisions.dateCreated AS date
|
||||
@ -33,10 +33,10 @@ function register(router: Router) {
|
||||
UNION ALL
|
||||
SELECT
|
||||
notes.noteId,
|
||||
notes.isDeleted AS currentIsDeleted,
|
||||
notes.deleteId AS currentDeleteId,
|
||||
notes.title AS currentTitle,
|
||||
notes.isProtected AS currentIsProtected,
|
||||
notes.isDeleted AS current_isDeleted,
|
||||
notes.deleteId AS current_deleteId,
|
||||
notes.title AS current_title,
|
||||
notes.isProtected AS current_isProtected,
|
||||
notes.title,
|
||||
notes.utcDateCreated AS utcDate,
|
||||
notes.dateCreated AS date
|
||||
@ -44,10 +44,10 @@ function register(router: Router) {
|
||||
UNION ALL
|
||||
SELECT
|
||||
notes.noteId,
|
||||
notes.isDeleted AS currentIsDeleted,
|
||||
notes.deleteId AS currentDeleteId,
|
||||
notes.title AS currentTitle,
|
||||
notes.isProtected AS currentIsProtected,
|
||||
notes.isDeleted AS current_isDeleted,
|
||||
notes.deleteId AS current_deleteId,
|
||||
notes.title AS current_title,
|
||||
notes.isProtected AS current_isProtected,
|
||||
notes.title,
|
||||
notes.utcDateModified AS utcDate,
|
||||
notes.dateModified AS date
|
||||
@ -68,10 +68,10 @@ function register(router: Router) {
|
||||
)
|
||||
SELECT
|
||||
notes.noteId,
|
||||
notes.isDeleted AS currentIsDeleted,
|
||||
notes.deleteId AS currentDeleteId,
|
||||
notes.title AS currentTitle,
|
||||
notes.isProtected AS currentIsProtected,
|
||||
notes.isDeleted AS current_isDeleted,
|
||||
notes.deleteId AS current_deleteId,
|
||||
notes.title AS current_title,
|
||||
notes.isProtected AS current_isProtected,
|
||||
revisions.title,
|
||||
revisions.utcDateCreated AS utcDate,
|
||||
revisions.dateCreated AS date
|
||||
@ -81,10 +81,10 @@ function register(router: Router) {
|
||||
UNION ALL
|
||||
SELECT
|
||||
notes.noteId,
|
||||
notes.isDeleted AS currentIsDeleted,
|
||||
notes.deleteId AS currentDeleteId,
|
||||
notes.title AS currentTitle,
|
||||
notes.isProtected AS currentIsProtected,
|
||||
notes.isDeleted AS current_isDeleted,
|
||||
notes.deleteId AS current_deleteId,
|
||||
notes.title AS current_title,
|
||||
notes.isProtected AS current_isProtected,
|
||||
notes.title,
|
||||
notes.utcDateCreated AS utcDate,
|
||||
notes.dateCreated AS date
|
||||
@ -93,10 +93,10 @@ function register(router: Router) {
|
||||
UNION ALL
|
||||
SELECT
|
||||
notes.noteId,
|
||||
notes.isDeleted AS currentIsDeleted,
|
||||
notes.deleteId AS currentDeleteId,
|
||||
notes.title AS currentTitle,
|
||||
notes.isProtected AS currentIsProtected,
|
||||
notes.isDeleted AS current_isDeleted,
|
||||
notes.deleteId AS current_deleteId,
|
||||
notes.title AS current_title,
|
||||
notes.isProtected AS current_isProtected,
|
||||
notes.title,
|
||||
notes.utcDateModified AS utcDate,
|
||||
notes.dateModified AS date
|
||||
@ -107,17 +107,17 @@ function register(router: Router) {
|
||||
}
|
||||
|
||||
for (const change of recentChanges) {
|
||||
if (change.currentIsProtected) {
|
||||
if (change.current_isProtected) {
|
||||
if (protectedSessionService.isProtectedSessionAvailable()) {
|
||||
change.title = protectedSessionService.decryptString(change.title) || "[protected]";
|
||||
change.currentTitle = protectedSessionService.decryptString(change.currentTitle) || "[protected]";
|
||||
change.current_title = protectedSessionService.decryptString(change.current_title) || "[protected]";
|
||||
} else {
|
||||
change.title = change.currentTitle = "[protected]";
|
||||
change.title = change.current_title = "[protected]";
|
||||
}
|
||||
}
|
||||
|
||||
if (change.currentIsDeleted) {
|
||||
const deleteId = change.currentDeleteId;
|
||||
if (change.current_isDeleted) {
|
||||
const deleteId = change.current_deleteId;
|
||||
|
||||
const undeletedParentBranchIds = noteService.getUndeletedParentBranchIds(change.noteId, deleteId);
|
||||
|
||||
|
||||
@ -56,10 +56,10 @@ export interface RevisionPojo {
|
||||
|
||||
export interface RecentChangeRow {
|
||||
noteId: string;
|
||||
currentIsDeleted: boolean;
|
||||
currentDeleteId: string;
|
||||
currentTitle: string;
|
||||
currentIsProtected: boolean;
|
||||
current_isDeleted: boolean;
|
||||
current_deleteId: string;
|
||||
current_title: string;
|
||||
current_isProtected: boolean;
|
||||
title: string;
|
||||
utcDate: string;
|
||||
date: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user