about summary refs log tree commit diff
path: root/src/state/lib/api.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-15 13:19:21 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-15 13:19:21 -0600
commit9a6df95adecaf3935fdbd58d893fca6489a040b9 (patch)
tree55715a9903d276315279be837af5ecabaa98fe41 /src/state/lib/api.ts
parent60c72087ff0bc13453d2a1602b92b41baf1c2a6a (diff)
downloadvoidsky-9a6df95adecaf3935fdbd58d893fca6489a040b9.tar.zst
Switch to using setVote()
Diffstat (limited to 'src/state/lib/api.ts')
-rw-r--r--src/state/lib/api.ts42
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 || ''},