Fix pubs page and add separate endpoint to generate invites
This commit is contained in:
parent
aa341188fe
commit
f63e2e42ab
|
@ -517,10 +517,15 @@ router.post("/profile/:id(*)/publish_secret", async (req, res) => {
|
|||
});
|
||||
|
||||
router.get("/pubs", async (_req, res) => {
|
||||
const invite = await ssb.client().invite.create({ uses: 10 });
|
||||
const peers = await ssb.client().gossip.peers();
|
||||
|
||||
res.render("desktop/pubs", { invite, peers });
|
||||
res.render("desktop/pubs", { peers });
|
||||
});
|
||||
|
||||
router.get("/pub_invite", async (_req, res) => {
|
||||
const invite = await ssb.client().invite.create({ uses: 1 });
|
||||
|
||||
res.json({ invite });
|
||||
});
|
||||
|
||||
router.post("/pubs/add", async (req, res) => {
|
||||
|
|
|
@ -7,7 +7,7 @@ module.exports = configInject(process.env.CONFIG_FOLDER || "ssb", {
|
|||
{
|
||||
scope: "public",
|
||||
host: "0.0.0.0",
|
||||
external: ["lvh.me"],
|
||||
external: "pub.feedless.social",
|
||||
transform: "shs",
|
||||
port: process.env.SSB_PORT || 8008,
|
||||
},
|
||||
|
|
|
@ -13,13 +13,6 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
<h2>Your Pub</h2>
|
||||
|
||||
<div>
|
||||
<p>Here is your pub address, copy and send to friends:</p>
|
||||
<code style="width: 80%; word-wrap: break-word;"><%= invite %></code>
|
||||
</div>
|
||||
|
||||
<h2>Connect to Pub</h2>
|
||||
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue