From 22d853e0b0c757c3849f554ecc28475736924a04 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 7 Apr 2026 20:26:55 +0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Elian Doran --- apps/client/src/services/frontend_script_api_preact.ts | 2 +- apps/client/src/widgets/type_widgets/relation_map/api.ts | 2 +- apps/server/src/services/backend_script_api.ts | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/client/src/services/frontend_script_api_preact.ts b/apps/client/src/services/frontend_script_api_preact.ts index a8c6f52a3d..9ce7a52e72 100644 --- a/apps/client/src/services/frontend_script_api_preact.ts +++ b/apps/client/src/services/frontend_script_api_preact.ts @@ -1,4 +1,4 @@ -import { createContext,Fragment, h, VNode } from "preact"; +import { createContext, Fragment, h, VNode } from "preact"; import * as hooks from "preact/hooks"; import ActionButton from "../widgets/react/ActionButton"; diff --git a/apps/client/src/widgets/type_widgets/relation_map/api.ts b/apps/client/src/widgets/type_widgets/relation_map/api.ts index 10cacff6ed..dec79bfa8a 100644 --- a/apps/client/src/widgets/type_widgets/relation_map/api.ts +++ b/apps/client/src/widgets/type_widgets/relation_map/api.ts @@ -87,8 +87,8 @@ export default class RelationMapApi { ); if (exists) return false; - await server.remove(`notes/${relation.sourceNoteId}/relations/${relation.name}/to/${relation.targetNoteId}`); await server.put(`notes/${relation.sourceNoteId}/relations/${newName}/to/${relation.targetNoteId}`); + await server.remove(`notes/${relation.sourceNoteId}/relations/${relation.name}/to/${relation.targetNoteId}`); this.onDataChange(true); return true; } diff --git a/apps/server/src/services/backend_script_api.ts b/apps/server/src/services/backend_script_api.ts index d84b21fb39..3eff3cc355 100644 --- a/apps/server/src/services/backend_script_api.ts +++ b/apps/server/src/services/backend_script_api.ts @@ -621,7 +621,7 @@ function BackendScriptApi(this: Api, currentNote: BNote, apiParams: ApiParams) { } const parentNoteId = opts.isVisible ? "_lbVisibleLaunchers" : "_lbAvailableLaunchers"; - const noteId = `al_${ opts.id}`; + const noteId = `al_${opts.id}`; const launcherNote = becca.getNote(noteId) || @@ -699,7 +699,6 @@ function BackendScriptApi(this: Api, currentNote: BNote, apiParams: ApiParams) { return `!@#Function: ${p.toString()}`; } return p; - }); } };