From 8455b87d3f9af6fe0b4ddb3a34fefebde055b7c2 Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Wed, 5 Oct 2022 12:36:36 +0000 Subject: [PATCH] [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix' --- .../url_service/short_urls/short_url_client.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/share/server/url_service/short_urls/short_url_client.ts b/src/plugins/share/server/url_service/short_urls/short_url_client.ts index 601eb2448ed09..096b2610b916a 100644 --- a/src/plugins/share/server/url_service/short_urls/short_url_client.ts +++ b/src/plugins/share/server/url_service/short_urls/short_url_client.ts @@ -154,14 +154,15 @@ export class ServerShortUrlClient implements IShortUrlClient { * Access field updates are executed in the background as we don't need to * wait for them and confirm that they were successful. */ - protected updateAccessFields(record: ShortUrlRecord) { + protected updateAccessFields(record: ShortUrlRecord) { const { storage } = this.dependencies; const { id, ...attributes } = record.data; - storage.update(id, { - ...attributes, - accessDate: Date.now(), - accessCount: (attributes.accessCount || 0) + 1, - }) + storage + .update(id, { + ...attributes, + accessDate: Date.now(), + accessCount: (attributes.accessCount || 0) + 1, + }) .catch(() => {}); // We are not interested if it succeeds or not. }