mirror of
https://github.com/snachodog/tok-to-insta-follower-bridge.git
synced 2025-09-13 23:43:31 -06:00
💫 add biome and format src files.
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging"
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging";
|
||||
import { BskyClient } from "~lib/bskyClient";
|
||||
|
||||
const handler: PlasmoMessaging.MessageHandler = async (req, res) => {
|
||||
const { session, subjectDid } = req.body
|
||||
const client = BskyClient.createAgentFromSession(session)
|
||||
const { session, subjectDid } = req.body;
|
||||
const client = BskyClient.createAgentFromSession(session);
|
||||
|
||||
try {
|
||||
res.send({
|
||||
result: await client.block(subjectDid)
|
||||
})
|
||||
result: await client.block(subjectDid),
|
||||
});
|
||||
} catch (e) {
|
||||
res.send({
|
||||
error: {
|
||||
message: e.message,
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default handler
|
||||
export default handler;
|
||||
|
@@ -1,21 +1,21 @@
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging"
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging";
|
||||
import { BskyClient } from "~lib/bskyClient";
|
||||
|
||||
const handler: PlasmoMessaging.MessageHandler = async (req, res) => {
|
||||
const { session, subjectDid } = req.body
|
||||
const client = BskyClient.createAgentFromSession(session)
|
||||
const { session, subjectDid } = req.body;
|
||||
const client = BskyClient.createAgentFromSession(session);
|
||||
|
||||
try {
|
||||
res.send({
|
||||
result: await client.follow(subjectDid)
|
||||
})
|
||||
result: await client.follow(subjectDid),
|
||||
});
|
||||
} catch (e) {
|
||||
res.send({
|
||||
error: {
|
||||
message: e.message,
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default handler
|
||||
export default handler;
|
||||
|
@@ -1,25 +1,25 @@
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging"
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging";
|
||||
import { BskyClient } from "../../lib/bskyClient";
|
||||
|
||||
const handler: PlasmoMessaging.MessageHandler = async (req, res) => {
|
||||
const { identifier, password } = req.body
|
||||
const { identifier, password } = req.body;
|
||||
|
||||
try {
|
||||
const agent = await BskyClient.createAgent({
|
||||
identifier,
|
||||
password,
|
||||
})
|
||||
});
|
||||
|
||||
res.send({
|
||||
session: agent.session,
|
||||
})
|
||||
});
|
||||
} catch (e) {
|
||||
res.send({
|
||||
error: {
|
||||
message: e.message,
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default handler
|
||||
export default handler;
|
||||
|
@@ -1,24 +1,24 @@
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging"
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging";
|
||||
import { BskyClient } from "~lib/bskyClient";
|
||||
|
||||
const handler: PlasmoMessaging.MessageHandler = async (req, res) => {
|
||||
const { session, term, limit } = req.body
|
||||
const client = BskyClient.createAgentFromSession(session)
|
||||
const { session, term, limit } = req.body;
|
||||
const client = BskyClient.createAgentFromSession(session);
|
||||
|
||||
try {
|
||||
res.send({
|
||||
actors: await client.searchUser({
|
||||
term,
|
||||
limit,
|
||||
})
|
||||
})
|
||||
}),
|
||||
});
|
||||
} catch (e) {
|
||||
res.send({
|
||||
error: {
|
||||
message: e.message,
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default handler
|
||||
export default handler;
|
||||
|
@@ -1,21 +1,21 @@
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging"
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging";
|
||||
import { BskyClient } from "~lib/bskyClient";
|
||||
|
||||
const handler: PlasmoMessaging.MessageHandler = async (req, res) => {
|
||||
const { session, blockUri } = req.body
|
||||
const client = BskyClient.createAgentFromSession(session)
|
||||
const { session, blockUri } = req.body;
|
||||
const client = BskyClient.createAgentFromSession(session);
|
||||
|
||||
try {
|
||||
res.send({
|
||||
result: await client.unblock(blockUri)
|
||||
})
|
||||
result: await client.unblock(blockUri),
|
||||
});
|
||||
} catch (e) {
|
||||
res.send({
|
||||
error: {
|
||||
message: e.message,
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default handler
|
||||
export default handler;
|
||||
|
@@ -1,21 +1,21 @@
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging"
|
||||
import type { PlasmoMessaging } from "@plasmohq/messaging";
|
||||
import { BskyClient } from "~lib/bskyClient";
|
||||
|
||||
const handler: PlasmoMessaging.MessageHandler = async (req, res) => {
|
||||
const { session, followUri } = req.body
|
||||
const client = BskyClient.createAgentFromSession(session)
|
||||
const { session, followUri } = req.body;
|
||||
const client = BskyClient.createAgentFromSession(session);
|
||||
|
||||
try {
|
||||
res.send({
|
||||
result: await client.unfollow(followUri)
|
||||
})
|
||||
result: await client.unfollow(followUri),
|
||||
});
|
||||
} catch (e) {
|
||||
res.send({
|
||||
error: {
|
||||
message: e.message,
|
||||
}
|
||||
})
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default handler
|
||||
export default handler;
|
||||
|
Reference in New Issue
Block a user