mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 13:44:29 +08:00
checking language aswell
This commit is contained in:
parent
c27efc1545
commit
5719158aec
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ class NewQuotesController {
|
|||
try {
|
||||
let { uid } = req.decodedToken;
|
||||
let { text, source, language } = req.body;
|
||||
if (text === "" || source === "") {
|
||||
if (!text || !source || !language) {
|
||||
throw new MonkeyError(400, "Please fill all the fields");
|
||||
}
|
||||
let data = await NewQuotesDAO.add(text, source, language, uid);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue