feat: prepare TypeORM support for Postgres db calls
This commit is contained in:
13
src/smoke-test.ts
Normal file
13
src/smoke-test.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Connection } from "typeorm";
|
||||
import { User } from "./entities/User";
|
||||
|
||||
export async function smokeTest(connection: Connection) {
|
||||
const user = new User();
|
||||
|
||||
user.name = "admin";
|
||||
user.role = "admin";
|
||||
user.createdAt = Date.now();
|
||||
user.passwordHash = "pretend this is a hash";
|
||||
|
||||
await connection.manager.save(user);
|
||||
}
|
||||
Reference in New Issue
Block a user