cleanup: delete unused files

This commit is contained in:
James Xylight committed 2025-09-07 10:47:30 -07:00
1 parent de26affacd
commit 3e909600d9
18 files changed
+64 -309

No files matched your search

-8
View File
@@ -1,8 +0,0 @@
import { fullCommunityName } from '$lib/util.svelte'
import type { Community, Person } from '$lib/client/types'
export const communityLink = (community: Community, prefix: string = '') =>
`${prefix}/c/${fullCommunityName(community.name, community.actor_id)}`
export const userLink = (person: Person, prefix: string = '') =>
`${prefix}/u/${person.name}@${new URL(person.actor_id).hostname}`
-13
View File
@@ -36,19 +36,6 @@ export function addSubscription(
}
}
export async function addAdmin(handle: string, added: boolean) {
const user = await client().resolveObject({
q: handle,
})
if (!user.person) throw new Error('No user found')
return await client().addAdmin({
added: added,
person_id: user.person.person.id,
})
}
export function hasFavorite(profile: ProfileInfo, id: number): boolean {
return profile.favorites?.map((i) => i.id).includes(id) ?? false
}