mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Rename var to be more clear
This commit is contained in:
parent
1dbb393e4d
commit
c3c8f38423
1 changed files with 5 additions and 5 deletions
|
@ -25,10 +25,10 @@ export async function generateTokenRequest(req: GenerateTokenRequest, res: Respo
|
||||||
if (type === TokenType.patreon
|
if (type === TokenType.patreon
|
||||||
|| ([TokenType.local, TokenType.gift].includes(type) && adminUserIDHash === config.adminUserID)
|
|| ([TokenType.local, TokenType.gift].includes(type) && adminUserIDHash === config.adminUserID)
|
||||||
|| type === TokenType.free) {
|
|| type === TokenType.free) {
|
||||||
const licenseKey = await createAndSaveToken(type, code, adminUserIDHash === config.adminUserID ? parseInt(total) : 1);
|
const licenseKeys = await createAndSaveToken(type, code, adminUserIDHash === config.adminUserID ? parseInt(total) : 1);
|
||||||
|
|
||||||
/* istanbul ignore else */
|
/* istanbul ignore else */
|
||||||
if (licenseKey) {
|
if (licenseKeys) {
|
||||||
if (type === TokenType.patreon) {
|
if (type === TokenType.patreon) {
|
||||||
return res.status(200).send(`
|
return res.status(200).send(`
|
||||||
<h1>
|
<h1>
|
||||||
|
@ -36,7 +36,7 @@ export async function generateTokenRequest(req: GenerateTokenRequest, res: Respo
|
||||||
</h1>
|
</h1>
|
||||||
<p>
|
<p>
|
||||||
<b>
|
<b>
|
||||||
${licenseKey[0]}
|
${licenseKeys[0]}
|
||||||
</b>
|
</b>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
@ -45,10 +45,10 @@ export async function generateTokenRequest(req: GenerateTokenRequest, res: Respo
|
||||||
`);
|
`);
|
||||||
} else if (type === TokenType.free) {
|
} else if (type === TokenType.free) {
|
||||||
return res.status(200).send({
|
return res.status(200).send({
|
||||||
licenseKey: licenseKey[0]
|
licenseKey: licenseKeys[0]
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return res.status(200).send(licenseKey.join("<br/>"));
|
return res.status(200).send(licenseKeys.join("<br/>"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return res.status(401).send(`
|
return res.status(401).send(`
|
||||||
|
|
Loading…
Reference in a new issue