Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preserve titles on existing resources #53

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuclia-sync-agent-app",
"version": "1.2.20",
"version": "1.2.21",
"description": "This is a Nuclia Sync Agent App",
"main": "build/index.js",
"scripts": {
Expand Down
4 changes: 4 additions & 0 deletions server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.2.21 (2024-04-18)

- Do not override title on existing resource

# 1.2.20 (2024-04-16)

- Fix metadata for links
Expand Down
8 changes: 7 additions & 1 deletion server/src/logic/sync/domain/nuclia-cloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,13 @@ export class NucliaCloud {

return this.getKb().pipe(
switchMap((kb) =>
kb.createOrUpdateResource(payload).pipe(
kb.hasResource(slug).pipe(
switchMap((exists) => {
if (exists) {
delete payload.title;
}
return kb.createOrUpdateResource(payload);
}),
retry(RETRY_CONFIG),
delay(500), // do not overload the server
catchError((error) => {
Expand Down