mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 04:32:35 +01:00
Add back include_url param to reg tokens
This commit is contained in:
parent
6755f1392d
commit
30ec479e25
@ -33,9 +33,17 @@ router.get(
|
||||
transaction: false,
|
||||
});
|
||||
|
||||
if (req.query.plain)
|
||||
return res.send(tokens.map((x) => x.token).join("\n"));
|
||||
const ret = req.query.include_url
|
||||
? tokens.map(
|
||||
(x) =>
|
||||
`${Config.get().general.frontPage}/register?token=${
|
||||
x.token
|
||||
}`,
|
||||
)
|
||||
: tokens.map((x) => x.token);
|
||||
|
||||
return res.json({ tokens: tokens.map((x) => x.token) });
|
||||
if (req.query.plain) return res.send(ret.join("\n"));
|
||||
|
||||
return res.json({ tokens: ret });
|
||||
},
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user