Move next js project to archive (#207)

This commit is contained in:
Aaron Po
2026-04-20 02:30:25 -04:00
committed by GitHub
parent 92ec16ce93
commit d47e3ed7f0
347 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import { singleUploadMiddleware } from '@/config/multer/uploadMiddleware';
import getCurrentUser from '@/config/nextConnect/middleware/getCurrentUser';
import { checkIfUserCanUpdateProfile, updateAvatar } from '@/controllers/users/profile';
import { UpdateProfileRequest } from '@/controllers/users/profile/types';
import APIResponseValidationSchema from '@/validation/APIResponseValidationSchema';
import { NextApiResponse } from 'next';
import { createRouter } from 'next-connect';
import { z } from 'zod';
const router = createRouter<
UpdateProfileRequest,
NextApiResponse<z.infer<typeof APIResponseValidationSchema>>
>();
router.put(
getCurrentUser,
checkIfUserCanUpdateProfile,
// @ts-expect-error
singleUploadMiddleware,
updateAvatar,
);
const handler = router.handler();
export default handler;
export const config = { api: { bodyParser: false } };