cleanup: delete unused files
This commit is contained in:
18 files changed
+64
-309
No files matched your search
@@ -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}`
|
||||
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user