diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-29 00:03:58 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-08-29 00:03:58 +0200 |
commit | 227a4e47f1ec9bca9b039c7c6761a335bcf622c2 (patch) | |
tree | 356056aa999e2b7b2d8b2e5094c98e63fa1bd2d2 /util/src/tes.ts | |
parent | :sparkles: typeorm api rewrite done (diff) | |
download | server-227a4e47f1ec9bca9b039c7c6761a335bcf622c2.tar.xz |
:sparkles: update util
Diffstat (limited to 'util/src/tes.ts')
-rw-r--r-- | util/src/tes.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/util/src/tes.ts b/util/src/tes.ts new file mode 100644 index 00000000..b469f1d8 --- /dev/null +++ b/util/src/tes.ts @@ -0,0 +1,19 @@ +import { performance } from "perf_hooks"; +import { Guild, Relationship, RelationshipType } from "./entities"; +import { User } from "./entities/User"; +import { initDatabase } from "./util"; + +initDatabase().then(async (x) => { + try { + const user = await new User( + { guilds: [], discriminator: "1", username: "test", flags: "0", public_flags: "0" }, + { id: "0" } + ).save(); + + user.relationships = [new Relationship({ type: RelationshipType.friends })]; + + user.save(); + } catch (error) { + console.error(error); + } +}); |