fix typos

This commit is contained in:
hippoz 2023-02-22 17:01:05 +02:00
parent e57ea4b4c0
commit 622f3c8e63
Signed by: hippoz
GPG key ID: 56C4E02A85F2FBED
2 changed files with 4 additions and 4 deletions

View file

@ -1,7 +1,7 @@
<script> <script>
import { onDestroy, onMount } from "svelte"; import { onDestroy, onMount } from "svelte";
import { getItem } from "../storage"; import { getItem } from "../storage";
import { messagesStoreProvider, overlayStore, selectedChannel, sendMessageAction, setMessageInputEvent, smallViewport, typingStore, userInfoStore } from "../stores"; import { selectedChannel, sendMessageAction, setMessageInputEvent, smallViewport, typingStore, userInfoStore } from "../stores";
export let channel; export let channel;
let messageInput = ""; let messageInput = "";
@ -26,7 +26,7 @@
typingList = ""; typingList = "";
for (let i = 0; i < typing.length; i++) { for (let i = 0; i < typing.length; i++) {
const item = typing[i]; const item = typing[i];
if (i == (typing.length - 1)) { if (i === (typing.length - 1)) {
// we are at the end // we are at the end
typingList += `and ${item.user.username} `; typingList += `and ${item.user.username} `;
} else { } else {

View file

@ -19,13 +19,13 @@ router.get(
async (req, res) => { async (req, res) => {
const call = req.query.calls; const call = req.query.calls;
if (typeof call !== "string" || !call.length || call.length > 4500) { if (typeof call !== "string" || !call.length || call.length > 4500) {
return res.json({ ...errors.BAD_REQUEST, detail: "Bad 'call': expected string between 1 and 4500 characters" }); return res.json({ ...errors.BAD_REQUEST, detail: "Bad 'calls': expected string between 1 and 4500 characters" });
} }
let callJson; let callJson;
try { try {
callJson = JSON.parse(call); callJson = JSON.parse(call);
} catch(O_o) { } catch(O_o) {
return res.json({ ...errors.BAD_REQUEST, detail: "Bad 'call': failed to parse as JSON" }); return res.json({ ...errors.BAD_REQUEST, detail: "Bad 'calls': failed to parse as JSON" });
} }
res.json(await processMethodBatch(req.authenticated ? req.user : null, callJson)); res.json(await processMethodBatch(req.authenticated ? req.user : null, callJson));
} }