feat(server): business owned by user data model
This commit is contained in:
12
server/src/scripts/create-user.ts
Normal file
12
server/src/scripts/create-user.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { db, testConnection } from "../util/db";
|
||||
import { hash } from "bcrypt";
|
||||
import Account from '../model/user';
|
||||
(async () =>{
|
||||
await testConnection();
|
||||
await Account.create({
|
||||
id: process.argv[2],
|
||||
displayName: process.argv[3],
|
||||
balance: process.argv[4],
|
||||
password: await hash(process.argv[5], 10),
|
||||
})
|
||||
})();
|
||||
Reference in New Issue
Block a user