common get post method, and control, edit page
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
import store from "@/store";
|
||||
import { store as storeProxy } from "@/store";
|
||||
import config from "@/config";
|
||||
|
||||
export default function handler(
|
||||
req: NextApiRequest,
|
||||
res: NextApiResponse,
|
||||
) {
|
||||
export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
const store = storeProxy.get();
|
||||
if (req.method === "POST") {
|
||||
if (!config.begin) {
|
||||
res.status(400).json({
|
||||
|
||||
Reference in New Issue
Block a user