Skip to content

Commit

Permalink
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
Browse files Browse the repository at this point in the history
…-ref HEAD~1..HEAD --fix'
  • Loading branch information
kibanamachine committed Oct 5, 2022
1 parent e7f437e commit 8455b87
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}

Expand Down

0 comments on commit 8455b87

Please sign in to comment.