This commit is contained in:
2022-08-27 08:14:10 -05:00
parent f65ae56f74
commit 696ca6a393
9 changed files with 101 additions and 77 deletions

View File

@@ -1,7 +1,6 @@
import db from "../../../lib/db";
import { withErrorHandling } from "../../../lib/apiHelpers";
const handler = withErrorHandling(async (req, res) => {
const handler = async (req, res) => {
const { method } = req;
switch (method) {
@@ -11,7 +10,7 @@ const handler = withErrorHandling(async (req, res) => {
res.setHeader("Allow", ["GET"]);
res.status(405).end(`Method ${method} Not Allowed`);
}
});
};
const get = async (req, res) => {
const params = {