Adds eslint and linted & improved routing for interactions
This commit is contained in:
parent
83209f642c
commit
441715675c
35 changed files with 2091 additions and 463 deletions
|
|
@ -2,7 +2,6 @@ import {DatabaseConnection} from "../Database/DatabaseConnection";
|
|||
import {Model} from "../Models/Model";
|
||||
import { Nullable } from "../types/Nullable";
|
||||
import {DatabaseDefinition} from "../Database/DatabaseDefinition";
|
||||
import {debug} from "node:util";
|
||||
import {Container} from "../Container/Container";
|
||||
import {EventHandler} from "../Events/EventHandler";
|
||||
import {ElementCreatedEvent} from "../Events/ElementCreatedEvent";
|
||||
|
|
@ -62,7 +61,7 @@ export class Repository<ModelType extends Model, IntermediateModelType = unknown
|
|||
SET ${Object.keys(createObject).map((key) => `${key} = ?`).join(',')}
|
||||
WHERE id = ?`;
|
||||
const result = this.database.execute(sql, ...Object.values(createObject), instance.id);
|
||||
return result.lastInsertRowid;
|
||||
return result.changes > 0;
|
||||
}
|
||||
|
||||
public getById(id: number): Nullable<ModelType> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue