Skip to content
Snippets Groups Projects
Commit 43738359 authored by michael.minelli's avatar michael.minelli
Browse files

User => Give object back at db creation

parent ceaef948
No related branches found
No related tags found
No related merge requests found
......@@ -81,9 +81,11 @@ class User extends Model {
};
}
async create(): Promise<void> {
async create(): Promise<User> {
const id = await db(User.tableName).insert(this.toDb());
this.userID = id[0];
return this;
}
update(): Promise<void> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment