diff options
| author | netop://ウィビ <paul@webb.page> | 2026-04-28 09:52:38 -0700 |
|---|---|---|
| committer | netop://ウィビ <paul@webb.page> | 2026-04-28 09:52:38 -0700 |
| commit | ecafa83e14045ebda8a00b251ab62cfc2d7f3012 (patch) | |
| tree | 69d3b9bbcaffe82ae7911c33a904d855f41fad22 /src/routes/api | |
| parent | 7f14dc601901d4b4494ccb97f43fc93285d0922a (diff) | |
| download | homepage-primary.tar.gz homepage-primary.zip | |
- updates deps
- updates about, forgot i had a typo
- updates blog panel
- fixes type issues across a few files
- updates uchu link
Diffstat (limited to 'src/routes/api')
| -rw-r--r-- | src/routes/api/blog.json/+server.ts | 2 | ||||
| -rw-r--r-- | src/routes/api/mastodon.json/+server.ts | 4 | ||||
| -rw-r--r-- | src/routes/api/remarks.json/+server.ts | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/routes/api/blog.json/+server.ts b/src/routes/api/blog.json/+server.ts index f416647..b942c95 100644 --- a/src/routes/api/blog.json/+server.ts +++ b/src/routes/api/blog.json/+server.ts @@ -28,7 +28,7 @@ export const POST = async({ fetch, request }) => { /*** HELPER ------------------------------------------- ***/ -function parseMemo(text: string): string { +function parseMemo(text: string): Array<string> { const intro = text.split(/^Body$/m)[0]; const lines = intro.split("\n").filter(Boolean); const format = [""]; diff --git a/src/routes/api/mastodon.json/+server.ts b/src/routes/api/mastodon.json/+server.ts index 72cbd38..f14f726 100644 --- a/src/routes/api/mastodon.json/+server.ts +++ b/src/routes/api/mastodon.json/+server.ts @@ -31,8 +31,8 @@ export const POST = async({ fetch }) => { /*** HELPER ------------------------------------------- ***/ -function findCreateType(arr: Array<{ [key: string]: any }>): { [key: string]: any } | undefined { - return arr.find(obj => obj.type === "Create"); +function findCreateType(arr: Array<{ [key: string]: any }>): { [key: string]: any; } { + return arr.find(obj => obj.type === "Create") || {}; } function processAttachments(attachments: Array<{ [key: string]: any }>): Array<string> { diff --git a/src/routes/api/remarks.json/+server.ts b/src/routes/api/remarks.json/+server.ts index c708207..238e034 100644 --- a/src/routes/api/remarks.json/+server.ts +++ b/src/routes/api/remarks.json/+server.ts @@ -28,7 +28,7 @@ export const POST = async({ fetch, request }) => { /*** HELPER ------------------------------------------- ***/ -function parseRemark(text: string): string { +function parseRemark(text: string): Array<string> { const intro = text.split(/^Body$/m)[0]; const lines = intro.split("\n").filter(Boolean); const format = [""]; |