diff options
Diffstat (limited to 'src/state/lib/api.ts')
-rw-r--r-- | src/state/lib/api.ts | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/state/lib/api.ts b/src/state/lib/api.ts index 807f257a9..ba2fcd3bb 100644 --- a/src/state/lib/api.ts +++ b/src/state/lib/api.ts @@ -51,48 +51,6 @@ export async function post( ) } -export async function upvote(store: RootStoreModel, uri: string, cid: string) { - return await store.api.app.bsky.feed.vote.create( - {did: store.me.did || ''}, - { - subject: {uri, cid}, - direction: 'up', - createdAt: new Date().toISOString(), - }, - ) -} - -export async function unupvote(store: RootStoreModel, upvoteUri: string) { - const urip = new AtUri(upvoteUri) - return await store.api.app.bsky.feed.vote.delete({ - did: urip.hostname, - rkey: urip.rkey, - }) -} - -export async function downvote( - store: RootStoreModel, - uri: string, - cid: string, -) { - return await store.api.app.bsky.feed.vote.create( - {did: store.me.did || ''}, - { - subject: {uri, cid}, - direction: 'down', - createdAt: new Date().toISOString(), - }, - ) -} - -export async function undownvote(store: RootStoreModel, downvoteUri: string) { - const urip = new AtUri(downvoteUri) - return await store.api.app.bsky.feed.vote.delete({ - did: urip.hostname, - rkey: urip.rkey, - }) -} - export async function repost(store: RootStoreModel, uri: string, cid: string) { return await store.api.app.bsky.feed.repost.create( {did: store.me.did || ''}, |