···11import type { UserCache } from '$lib/types';
22import { loadData } from '$lib/website/load';
33+import type { Handle } from '@atcute/lexicons';
34import { ImageResponse } from '@ethercorps/sveltekit-og';
4556export async function GET({ params, platform }) {
···7889 const cache = platform?.env?.USER_DATA_CACHE as unknown;
9101010- const data = await loadData(params.handle, cache as UserCache);
1111+ const data = await loadData(params.handle as Handle, cache as UserCache);
11121213 const image = data.profile.avatar;
1314
+2-1
src/routes/all/+page.server.ts
···11import { env } from '$env/dynamic/public';
22import type { UserCache, WebsiteData } from '$lib/types.js';
33import { loadData } from '$lib/website/load';
44+import type { Handle } from '@atcute/lexicons';
45import type { ProfileViewDetailed } from '@atproto/api/dist/client/types/app/bsky/actor/defs.js';
5667export async function load({ platform }) {
···24252526 const handle = env.PUBLIC_HANDLE;
26272727- const data = await loadData(handle, cache as unknown as UserCache);
2828+ const data = await loadData(handle as Handle, cache as unknown as UserCache);
28292930 data.publication ??= {};
3031 data.publication.preferences ??= {};
+2-4
src/routes/api/links/+server.ts
···77 return json({ error: 'No link provided' }, { status: 400 });
88 }
991010- // check if link is valid url
1110 try {
1211 new URL(link);
1313- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1414- } catch (_) {
1515- return json({ error: 'Link is not a valid url' }, { status: 500 });
1212+ } catch {
1313+ return json({ error: 'Link is not a valid url' }, { status: 400 });
1614 }
17151816 try {
+5-3
src/routes/api/reloadRecent/+server.ts
···11import { getDetailedProfile } from '$lib/atproto';
22-import type { ProfileViewDetailed } from '@atproto/api/dist/client/types/app/bsky/actor/defs';
32import { json } from '@sveltejs/kit';
33+import type { AppBskyActorDefs } from '@atcute/bluesky';
4455export async function GET({ platform }) {
66 if (!platform?.env?.USER_DATA_CACHE) return json('no cache');
77 const existingUsers = await platform?.env?.USER_DATA_CACHE?.get('updatedBlentos');
8899- const existingUsersArray: ProfileViewDetailed[] = existingUsers ? JSON.parse(existingUsers) : [];
99+ const existingUsersArray: AppBskyActorDefs.ProfileViewDetailed[] = existingUsers
1010+ ? JSON.parse(existingUsers)
1111+ : [];
10121113 const existingUsersSet = new Set(existingUsersArray.map((v) => v.did));
12141313- const newProfilesPromises: Promise<ProfileViewDetailed>[] = [];
1515+ const newProfilesPromises: Promise<AppBskyActorDefs.ProfileViewDetailed | undefined>[] = [];
1416 for (const did of Array.from(existingUsersSet)) {
1517 const profile = getDetailedProfile({ did });
1618 newProfilesPromises.push(profile);
+4-2
src/routes/api/update/+server.ts
···11import type { UserCache } from '$lib/types';
22import { getCache, loadData } from '$lib/website/load';
33-import type { ProfileViewDetailed } from '@atproto/api/dist/client/types/app/bsky/actor/defs';
33+import type { AppBskyActorDefs } from '@atcute/bluesky';
44import { json } from '@sveltejs/kit';
5566export async function GET({ platform }) {
77 if (!platform?.env?.USER_DATA_CACHE) return json('no cache');
88 const existingUsers = await platform?.env?.USER_DATA_CACHE?.get('updatedBlentos');
991010- const existingUsersArray: ProfileViewDetailed[] = existingUsers ? JSON.parse(existingUsers) : [];
1010+ const existingUsersArray: AppBskyActorDefs.ProfileViewDetailed[] = existingUsers
1111+ ? JSON.parse(existingUsers)
1212+ : [];
11131214 const existingUsersHandle = existingUsersArray.map((v) => v.handle);
1315
+2-1
src/routes/edit/+page.server.ts
···11import { loadData } from '$lib/website/load';
22import { env } from '$env/dynamic/public';
33import type { UserCache } from '$lib/types';
44+import type { Handle } from '@atcute/lexicons';
4556export async function load({ url, platform }) {
67 const hostname = url.hostname;
···12131314 const cache = platform?.env?.USER_DATA_CACHE as unknown;
14151515- return await loadData(handle, cache as UserCache);
1616+ return await loadData(handle as Handle, cache as UserCache);
1617}