perf: 改用hash索引

This commit is contained in:
archer
2023-03-31 02:58:09 +08:00
parent 5ec8aac3ac
commit ed1f93d836
10 changed files with 92 additions and 35 deletions

View File

@@ -12,8 +12,8 @@ import { httpsAgent } from '@/service/utils/tools';
import { ModelPopulate } from '@/types/mongoSchema';
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.headers.auth !== 'archer') {
throw new Error('凭证错误');
if (process.env.NODE_ENV !== 'development') {
throw new Error('不是开发环境');
}
try {
await connectToDatabase();