feat: add v0.19.0 support
This commit is contained in:
1 parent
b3b8a10e44
commit
119ab53946
62 files changed
+188
-157
No files matched your search
@@ -10,7 +10,6 @@ export const blockUser = async (block: boolean, id: number) => {
|
||||
if (!auth) throw new Error('Unauthorized')
|
||||
|
||||
const response = await getClient().blockPerson({
|
||||
auth: auth,
|
||||
block: block,
|
||||
person_id: id,
|
||||
})
|
||||
@@ -53,14 +52,12 @@ export const addSubscription = (
|
||||
export const addAdmin = async (handle: string, added: boolean, jwt: string) =>
|
||||
trycatch(async () => {
|
||||
const user = await getClient().resolveObject({
|
||||
auth: jwt,
|
||||
q: handle,
|
||||
})
|
||||
|
||||
if (!user.person) throw new Error('No user found')
|
||||
|
||||
return await getClient().addAdmin({
|
||||
auth: jwt,
|
||||
added: true,
|
||||
person_id: user.person.person.id,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user