mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
simplified new entity ID allocation
This commit is contained in:
@@ -8,9 +8,7 @@ class ApiToken extends Entity {
|
||||
static get primaryKeyName() { return "apiTokenId"; }
|
||||
|
||||
beforeSaving() {
|
||||
if (!this.apiTokenId) {
|
||||
this.apiTokenId = utils.newApiTokenId();
|
||||
}
|
||||
super.beforeSaving();
|
||||
|
||||
if (!this.isDeleted) {
|
||||
this.isDeleted = false;
|
||||
|
||||
Reference in New Issue
Block a user