fix typos
This commit is contained in:
parent
e57ea4b4c0
commit
622f3c8e63
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import { onDestroy, onMount } from "svelte";
|
||||
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;
|
||||
let messageInput = "";
|
||||
|
@ -26,7 +26,7 @@
|
|||
typingList = "";
|
||||
for (let i = 0; i < typing.length; i++) {
|
||||
const item = typing[i];
|
||||
if (i == (typing.length - 1)) {
|
||||
if (i === (typing.length - 1)) {
|
||||
// we are at the end
|
||||
typingList += `and ${item.user.username} `;
|
||||
} else {
|
||||
|
|
|
@ -19,13 +19,13 @@ router.get(
|
|||
async (req, res) => {
|
||||
const call = req.query.calls;
|
||||
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;
|
||||
try {
|
||||
callJson = JSON.parse(call);
|
||||
} 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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue