Skip to content

Commit

Permalink
[DEBUG]Handling when the number is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
yinxoxo committed Jul 8, 2024
1 parent a5a89df commit f8380f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Week3/NodeJS/routes/getData.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const router = express.Router();
router.get("/getData", (req, res) => {
const number = req.query.number;

if (number === undefined) {
if (number === undefined || number === "") {
res.send("Lack of Parameter");
} else if (
//不是數字、整數、正數
Expand Down

0 comments on commit f8380f7

Please sign in to comment.