-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7923164
commit 3ac0259
Showing
36 changed files
with
840 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findLawProblemById } from "../../../../server/mongodb/actions/lawProblem"; | ||
import requestWrapper from "../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findLawProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllLawProblems } from "../../../../server/mongodb/actions/lawProblem"; | ||
import requestWrapper from "../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllLawProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findMathProblemById } from "../../../../server/mongodb/actions/numericalProblem"; | ||
import requestWrapper from "../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findMathProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllMathProblems } from "../../../../server/mongodb/actions/numericalProblem"; | ||
import requestWrapper from "../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllMathProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findMathProofProblemById } from "../../../../../../server/mongodb/actions/numericalProblem"; | ||
import requestWrapper from "../../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findMathProofProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllMathProofProblems } from "../../../../../../server/mongodb/actions/numericalProblem"; | ||
import requestWrapper from "../../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllMathProofProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findMathSymbolicProblemById } from "../../../../../../server/mongodb/actions/numericalProblem"; | ||
import requestWrapper from "../../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findMathSymbolicProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllMathSymbolicProblems } from "../../../../../../server/mongodb/actions/numericalProblem"; | ||
import requestWrapper from "../../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllMathSymbolicProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findReadingTestProblemById } from "../../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findReadingTestProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllReadingTestProblems } from "../../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllReadingTestProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findReadingProblemById } from "../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findReadingProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllReadingProblems } from "../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllReadingProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findScienceImagesTestProblemById } from "../../../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findScienceImagesTestProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllScienceImagesTestProblems } from "../../../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllScienceImagesTestProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findScienceTestProblemById } from "../../../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findScienceTestProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllScienceTestProblems } from "../../../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllScienceTestProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findScienceImagesProblemById } from "../../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findScienceImagesProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllScienceImagesProblems } from "../../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllScienceImagesProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findScienceProblemById } from "../../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findScienceProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllScienceProblems } from "../../../../../server/mongodb/actions/mcatProblem"; | ||
import requestWrapper from "../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllScienceProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { findPhysicsImgProblemById } from "../../../../../server/mongodb/actions/numericalProblem"; | ||
import requestWrapper from "../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
if (req.method !== "GET") { | ||
res.status(405).end(); | ||
return; | ||
} | ||
const { id } = req.query; | ||
const problem = await findPhysicsImgProblemById(id); | ||
|
||
const formattedResponse = JSON.stringify(problem, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { getAllPhysicsImgProblems } from "../../../../../server/mongodb/actions/numericalProblem"; | ||
import requestWrapper from "../../../../../server/utils/middleware"; | ||
|
||
async function handler(req: NextApiRequest, res: NextApiResponse) { | ||
const allProblems = await getAllPhysicsImgProblems(); | ||
|
||
const formattedResponse = JSON.stringify(allProblems, null, 2); | ||
|
||
res.setHeader("Content-Type", "application/json"); | ||
res.status(200).send(formattedResponse); | ||
} | ||
|
||
export default requestWrapper(handler, "GET"); |
Oops, something went wrong.