summary refs log tree commit diff
path: root/src/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/routes/guilds/#guild_id/delete.ts3
-rw-r--r--src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts3
-rw-r--r--src/api/util/utility/Base64.ts3
3 files changed, 3 insertions, 6 deletions
diff --git a/src/api/routes/guilds/#guild_id/delete.ts b/src/api/routes/guilds/#guild_id/delete.ts

index 195190f7..509445c4 100644 --- a/src/api/routes/guilds/#guild_id/delete.ts +++ b/src/api/routes/guilds/#guild_id/delete.ts
@@ -45,8 +45,7 @@ router.post( where: { id: guild_id }, select: ["owner_id"], }); - if (guild.owner_id !== req.user_id) - throw new HTTPError("You are not the owner of this guild", 401); + if (guild.owner_id !== req.user_id) throw new HTTPError("You are not the owner of this guild", 401); await Promise.all([ Guild.delete({ id: guild_id }), // this will also delete all guild related data diff --git a/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts b/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts
index a0f42daa..6dc06563 100644 --- a/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts +++ b/src/api/routes/users/@me/mfa/webauthn/credentials/#key_id/index.ts
@@ -41,8 +41,7 @@ router.delete( }); // disable webauthn if there are no keys left - if (keys === 0) - await User.update({ id: req.user_id }, { webauthn_enabled: false }); + if (keys === 0) await User.update({ id: req.user_id }, { webauthn_enabled: false }); res.sendStatus(204); }, diff --git a/src/api/util/utility/Base64.ts b/src/api/util/utility/Base64.ts
index c6d1257c..7426d22b 100644 --- a/src/api/util/utility/Base64.ts +++ b/src/api/util/utility/Base64.ts
@@ -16,8 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -const alphabet = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+"; +const alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+"; // binary to string lookup table const b2s = alphabet.split("");