From d6cae5ace1398797a3a6e5b27af9b999da45c9a0 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Fri, 15 Nov 2024 18:03:16 +0100 Subject: [PATCH] Small cleanups --- api/README.md | 12 ++++++------ api/bun.lockb | Bin 39908 -> 39908 bytes api/src/seed.ts | 7 ------- api/src/utils.ts | 4 ++-- 4 files changed, 8 insertions(+), 15 deletions(-) delete mode 100644 api/src/seed.ts diff --git a/api/README.md b/api/README.md index 942cba07..eb50f915 100644 --- a/api/README.md +++ b/api/README.md @@ -98,7 +98,7 @@ erDiagram datetime next_refresh jsonb external_id } - + season_translations { guid id PK,FK string language PK @@ -107,17 +107,17 @@ erDiagram jsonb poster jsonb banner jsonb logo - jsonb thumbnail + jsonb thumbnail } seasons ||--|{ season_translations : has seasons ||--o{ entries : has shows ||--|{ seasons : has - + watched_shows { guid show_id PK, FK guid user_id PK, FK status status "completed|watching|droped|planned" - uint seen_entry_count "NN" + uint seen_entry_count "NN" } shows ||--|{ watched_shows : has @@ -129,7 +129,7 @@ erDiagram datetime played_date } entries ||--|{ watched_entries : has - + roles { guid show_id PK, FK guid staff_id PK, FK @@ -152,7 +152,7 @@ erDiagram datetime next_refresh jsonb external_id } - + staff_translations { guid id PK,FK string language PK diff --git a/api/bun.lockb b/api/bun.lockb index 518a9809290739c25f2c15b17f7972915dca1c2f..4a5df0ec1fe08dd60425144f6e74a0916ed44688 100755 GIT binary patch delta 206 zcmaE|o$1MTrVW`n^^9>AdWMF2h6bDr3=BZrQ2i$TY=_WmB@V_ops=2?34;(&h8HOF zI==b(Iks<%Ob{7E1_pVcj37|P>V8^$MBw>*P#IGO1_PiBH&90T;)dL=u=FILjDen! zg`NR}HB_cwZDCF4Jo~_1U@2oWJwt}noXXb|B z7@6QQ@<16upp4c1wD^d?^Y;)k20$5Zpp5dx4Y^%m=}8C~Yp6`W+QOR7dG>+35K^f* qmBpEf3=GZ-9{;#!d$ScGQ;-hS1q4r>AMFcm7ZQTYY*x?Rs|Nt;C_tV7 diff --git a/api/src/seed.ts b/api/src/seed.ts deleted file mode 100644 index 24aa2b17..00000000 --- a/api/src/seed.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { db } from "./db"; -import { videos } from "./db/schema/videos"; -import { Video } from "./models/video"; - -const seed = async () =>{ - db.insert(videos).values(Video.examples) -}; diff --git a/api/src/utils.ts b/api/src/utils.ts index b4b1ca96..eefe2e39 100644 --- a/api/src/utils.ts +++ b/api/src/utils.ts @@ -1,3 +1,3 @@ // remove indent in multi-line comments -export const comment = (str: TemplateStringsArray) => - str.toString().replace(/^\s+/gm, ""); +export const comment = (str: TemplateStringsArray, ...values: any[]) => + str.reduce((acc, str, i) => `${acc}${str}${values[i]}`).replace(/^\s+/gm, "");