-router.get("/problems", (req,res) => {
- const probId = req.query["pid"];
- if (probId && probId.match(/^[0-9]+$/))
- {
- ProblemModel.getOne(req.query["pid"], (err,problem) => {
+router.get("/problems", access.ajax, (req,res) => {
+ const probId = req.query["id"];
+ const cursor = req.query["cursor"];
+ if (!!probId && !!probId.match(/^[0-9]+$/)) {
+ ProblemModel.getOne(probId, (err, problem) => {