From e3eeb8cf460e9968d6a1c8a27e7725c4080bd7af Mon Sep 17 00:00:00 2001 From: Aaron William Po Date: Mon, 18 Dec 2023 16:43:53 -0500 Subject: [PATCH] Restructure requests directory --- src/components/Account/AccountInfo.tsx | 6 +++--- src/components/Account/Security.tsx | 2 +- src/components/BeerById/BeerCommentForm.tsx | 2 +- src/components/BeerById/BeerPostLikeButton.tsx | 2 +- src/components/BeerStyleById/BeerStyleCommentForm.tsx | 2 +- src/components/BeerStyleById/BeerStyleLikeButton.tsx | 2 +- src/components/BreweryById/BreweryCommentForm.tsx | 2 +- src/components/BreweryIndex/BreweryPostLikeButton.tsx | 2 +- src/components/BreweryPost/CreateBreweryPostForm.tsx | 4 ++-- src/components/CreateBeerPostForm.tsx | 4 ++-- src/components/EditBeerPostForm.tsx | 4 ++-- src/components/Login/LoginForm.tsx | 2 +- src/components/RegisterUserForm.tsx | 2 +- src/components/UserPage/UserFollowButton.tsx | 2 +- src/pages/users/account/edit-profile.tsx | 4 ++-- src/pages/users/forgot-password.tsx | 2 +- .../beer-comment}/sendCreateBeerCommentRequest.ts | 0 .../sendCreateBeerStyleCommentRequest.ts | 0 .../brewery-comment}/sendCreateBreweryCommentRequest.ts | 0 .../beer-image}/sendUploadBeerImageRequest.ts | 0 .../brewery-image}/sendUploadBreweryImageRequest.ts | 0 .../beer-post-like}/sendBeerPostLikeRequest.ts | 0 .../beer-style-like}/sendBeerStyleLikeRequest.ts | 0 .../brewery-post-like}/sendBreweryPostLikeRequest.ts | 0 .../{BeerPost => posts/beer-post}/deleteBeerPostRequest.ts | 0 .../beer-post}/sendCreateBeerPostRequest.ts | 0 .../beer-post}/sendEditBeerPostRequest.ts | 0 .../brewery-post}/sendCreateBreweryPostRequest.ts | 0 src/requests/{User => users/auth}/sendEditUserRequest.ts | 0 .../{User => users/auth}/sendForgotPasswordRequest.ts | 0 src/requests/{User => users/auth}/sendLoginUserRequest.ts | 0 .../{User => users/auth}/sendRegisterUserRequest.ts | 0 .../{User => users/auth}/sendUpdatePasswordRequest.ts | 0 .../{UserFollow => users/auth}/sendUserFollowRequest.ts | 0 src/requests/{User => users/auth}/validateEmailRequest.ts | 0 .../profile}/sendUpdateUserAvatarRequest.ts | 0 .../profile}/sendUpdateUserProfileRequest.ts | 0 src/requests/{ => users/profile}/validateUsernameRequest.ts | 0 .../users/auth/schema/CreateUserValidationSchemas.ts | 4 ++-- 39 files changed, 24 insertions(+), 24 deletions(-) rename src/requests/{BeerComment => comments/beer-comment}/sendCreateBeerCommentRequest.ts (100%) rename src/requests/{BeerStyleComment => comments/beer-style-comment}/sendCreateBeerStyleCommentRequest.ts (100%) rename src/requests/{BreweryComment => comments/brewery-comment}/sendCreateBreweryCommentRequest.ts (100%) rename src/requests/{BeerImage => images/beer-image}/sendUploadBeerImageRequest.ts (100%) rename src/requests/{BreweryImage => images/brewery-image}/sendUploadBreweryImageRequest.ts (100%) rename src/requests/{BeerPostLike => likes/beer-post-like}/sendBeerPostLikeRequest.ts (100%) rename src/requests/{BeerStyleLike => likes/beer-style-like}/sendBeerStyleLikeRequest.ts (100%) rename src/requests/{BreweryPostLike => likes/brewery-post-like}/sendBreweryPostLikeRequest.ts (100%) rename src/requests/{BeerPost => posts/beer-post}/deleteBeerPostRequest.ts (100%) rename src/requests/{BeerPost => posts/beer-post}/sendCreateBeerPostRequest.ts (100%) rename src/requests/{BeerPost => posts/beer-post}/sendEditBeerPostRequest.ts (100%) rename src/requests/{BreweryPost => posts/brewery-post}/sendCreateBreweryPostRequest.ts (100%) rename src/requests/{User => users/auth}/sendEditUserRequest.ts (100%) rename src/requests/{User => users/auth}/sendForgotPasswordRequest.ts (100%) rename src/requests/{User => users/auth}/sendLoginUserRequest.ts (100%) rename src/requests/{User => users/auth}/sendRegisterUserRequest.ts (100%) rename src/requests/{User => users/auth}/sendUpdatePasswordRequest.ts (100%) rename src/requests/{UserFollow => users/auth}/sendUserFollowRequest.ts (100%) rename src/requests/{User => users/auth}/validateEmailRequest.ts (100%) rename src/requests/{Account => users/profile}/sendUpdateUserAvatarRequest.ts (100%) rename src/requests/{Account => users/profile}/sendUpdateUserProfileRequest.ts (100%) rename src/requests/{ => users/profile}/validateUsernameRequest.ts (100%) diff --git a/src/components/Account/AccountInfo.tsx b/src/components/Account/AccountInfo.tsx index 63cf7c5..9eaf183 100644 --- a/src/components/Account/AccountInfo.tsx +++ b/src/components/Account/AccountInfo.tsx @@ -1,5 +1,5 @@ -import validateEmailRequest from '@/requests/User/validateEmailRequest'; -import validateUsernameRequest from '@/requests/validateUsernameRequest'; +import validateEmailRequest from '@/requests/users/auth/validateEmailRequest'; +import validateUsernameRequest from '@/requests/users/profile/validateUsernameRequest'; import { BaseCreateUserSchema } from '@/services/users/auth/schema/CreateUserValidationSchemas'; import { Switch } from '@headlessui/react'; import { zodResolver } from '@hookform/resolvers/zod'; @@ -7,7 +7,7 @@ import { Dispatch, FC, useContext } from 'react'; import { useForm } from 'react-hook-form'; import { z } from 'zod'; import UserContext from '@/contexts/UserContext'; -import sendEditUserRequest from '@/requests/User/sendEditUserRequest'; +import sendEditUserRequest from '@/requests/users/auth/sendEditUserRequest'; import createErrorToast from '@/util/createErrorToast'; import { toast } from 'react-hot-toast'; import { AccountPageAction, AccountPageState } from '@/reducers/accountPageReducer'; diff --git a/src/components/Account/Security.tsx b/src/components/Account/Security.tsx index f9e0b79..7ed1bbf 100644 --- a/src/components/Account/Security.tsx +++ b/src/components/Account/Security.tsx @@ -4,7 +4,7 @@ import { SubmitHandler, useForm } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; import { z } from 'zod'; import { UpdatePasswordSchema } from '@/services/users/auth/schema/CreateUserValidationSchemas'; -import sendUpdatePasswordRequest from '@/requests/User/sendUpdatePasswordRequest'; +import sendUpdatePasswordRequest from '@/requests/users/auth/sendUpdatePasswordRequest'; import { AccountPageState, AccountPageAction } from '@/reducers/accountPageReducer'; import toast from 'react-hot-toast'; import createErrorToast from '@/util/createErrorToast'; diff --git a/src/components/BeerById/BeerCommentForm.tsx b/src/components/BeerById/BeerCommentForm.tsx index ce7d752..aef448b 100644 --- a/src/components/BeerById/BeerCommentForm.tsx +++ b/src/components/BeerById/BeerCommentForm.tsx @@ -1,4 +1,4 @@ -import sendCreateBeerCommentRequest from '@/requests/BeerComment/sendCreateBeerCommentRequest'; +import sendCreateBeerCommentRequest from '@/requests/comments/beer-comment/sendCreateBeerCommentRequest'; import BeerPostQueryResult from '@/services/posts/beer-post/schema/BeerPostQueryResult'; import { zodResolver } from '@hookform/resolvers/zod'; diff --git a/src/components/BeerById/BeerPostLikeButton.tsx b/src/components/BeerById/BeerPostLikeButton.tsx index 4ecad09..5ab4fdc 100644 --- a/src/components/BeerById/BeerPostLikeButton.tsx +++ b/src/components/BeerById/BeerPostLikeButton.tsx @@ -3,7 +3,7 @@ import useCheckIfUserLikesBeerPost from '@/hooks/data-fetching/beer-likes/useChe import { FC, useEffect, useState } from 'react'; import useGetBeerPostLikeCount from '@/hooks/data-fetching/beer-likes/useBeerPostLikeCount'; -import sendBeerPostLikeRequest from '@/requests/BeerPostLike/sendBeerPostLikeRequest'; +import sendBeerPostLikeRequest from '@/requests/likes/beer-post-like/sendBeerPostLikeRequest'; import LikeButton from '../ui/LikeButton'; const BeerPostLikeButton: FC<{ diff --git a/src/components/BeerStyleById/BeerStyleCommentForm.tsx b/src/components/BeerStyleById/BeerStyleCommentForm.tsx index 7e9f0e4..7ab0df9 100644 --- a/src/components/BeerStyleById/BeerStyleCommentForm.tsx +++ b/src/components/BeerStyleById/BeerStyleCommentForm.tsx @@ -10,7 +10,7 @@ import createErrorToast from '@/util/createErrorToast'; import BeerStyleQueryResult from '@/services/posts/beer-style-post/schema/BeerStyleQueryResult'; import useBeerStyleComments from '@/hooks/data-fetching/beer-style-comments/useBeerStyleComments'; -import sendCreateBeerStyleCommentRequest from '@/requests/BeerStyleComment/sendCreateBeerStyleCommentRequest'; +import sendCreateBeerStyleCommentRequest from '@/requests/comments/beer-style-comment/sendCreateBeerStyleCommentRequest'; import CommentForm from '../ui/CommentForm'; interface BeerCommentFormProps { diff --git a/src/components/BeerStyleById/BeerStyleLikeButton.tsx b/src/components/BeerStyleById/BeerStyleLikeButton.tsx index 0d31c14..1e9f841 100644 --- a/src/components/BeerStyleById/BeerStyleLikeButton.tsx +++ b/src/components/BeerStyleById/BeerStyleLikeButton.tsx @@ -2,7 +2,7 @@ import { FC, useEffect, useState } from 'react'; import useGetBeerPostLikeCount from '@/hooks/data-fetching/beer-likes/useBeerPostLikeCount'; import useCheckIfUserLikesBeerStyle from '@/hooks/data-fetching/beer-style-likes/useCheckIfUserLikesBeerPost'; -import sendBeerStyleLikeRequest from '@/requests/BeerStyleLike/sendBeerStyleLikeRequest'; +import sendBeerStyleLikeRequest from '@/requests/likes/beer-style-like/sendBeerStyleLikeRequest'; import LikeButton from '../ui/LikeButton'; const BeerStyleLikeButton: FC<{ diff --git a/src/components/BreweryById/BreweryCommentForm.tsx b/src/components/BreweryById/BreweryCommentForm.tsx index 162302c..a42ada7 100644 --- a/src/components/BreweryById/BreweryCommentForm.tsx +++ b/src/components/BreweryById/BreweryCommentForm.tsx @@ -6,7 +6,7 @@ import { FC } from 'react'; import { useForm, SubmitHandler } from 'react-hook-form'; import toast from 'react-hot-toast'; import { z } from 'zod'; -import sendCreateBreweryCommentRequest from '@/requests/BreweryComment/sendCreateBreweryCommentRequest'; +import sendCreateBreweryCommentRequest from '@/requests/comments/brewery-comment/sendCreateBreweryCommentRequest'; import createErrorToast from '@/util/createErrorToast'; import CommentForm from '../ui/CommentForm'; diff --git a/src/components/BreweryIndex/BreweryPostLikeButton.tsx b/src/components/BreweryIndex/BreweryPostLikeButton.tsx index c52c263..46534ec 100644 --- a/src/components/BreweryIndex/BreweryPostLikeButton.tsx +++ b/src/components/BreweryIndex/BreweryPostLikeButton.tsx @@ -1,6 +1,6 @@ import useCheckIfUserLikesBreweryPost from '@/hooks/data-fetching/brewery-likes/useCheckIfUserLikesBreweryPost'; import useGetBreweryPostLikeCount from '@/hooks/data-fetching/brewery-likes/useGetBreweryPostLikeCount'; -import sendBreweryPostLikeRequest from '@/requests/BreweryPostLike/sendBreweryPostLikeRequest'; +import sendBreweryPostLikeRequest from '@/requests/likes/brewery-post-like/sendBreweryPostLikeRequest'; import { FC, useState } from 'react'; import LikeButton from '../ui/LikeButton'; diff --git a/src/components/BreweryPost/CreateBreweryPostForm.tsx b/src/components/BreweryPost/CreateBreweryPostForm.tsx index 4b1d2b6..7a7aaae 100644 --- a/src/components/BreweryPost/CreateBreweryPostForm.tsx +++ b/src/components/BreweryPost/CreateBreweryPostForm.tsx @@ -1,5 +1,5 @@ -import sendUploadBreweryImagesRequest from '@/requests/BreweryImage/sendUploadBreweryImageRequest'; -import sendCreateBreweryPostRequest from '@/requests/BreweryPost/sendCreateBreweryPostRequest'; +import sendUploadBreweryImagesRequest from '@/requests/images/brewery-image/sendUploadBreweryImageRequest'; +import sendCreateBreweryPostRequest from '@/requests/posts/brewery-post/sendCreateBreweryPostRequest'; import CreateBreweryPostSchema from '@/services/posts/brewery-post/schema/CreateBreweryPostSchema'; import UploadImageValidationSchema from '@/services/schema/ImageSchema/UploadImageValidationSchema'; import createErrorToast from '@/util/createErrorToast'; diff --git a/src/components/CreateBeerPostForm.tsx b/src/components/CreateBeerPostForm.tsx index fdba62f..42bea2e 100644 --- a/src/components/CreateBeerPostForm.tsx +++ b/src/components/CreateBeerPostForm.tsx @@ -6,9 +6,9 @@ import { useForm, SubmitHandler, FieldError } from 'react-hook-form'; import { z } from 'zod'; import BreweryPostQueryResult from '@/services/posts/brewery-post/schema/BreweryPostQueryResult'; import CreateBeerPostValidationSchema from '@/services/posts/beer-post/schema/CreateBeerPostValidationSchema'; -import sendCreateBeerPostRequest from '@/requests/BeerPost/sendCreateBeerPostRequest'; +import sendCreateBeerPostRequest from '@/requests/posts/beer-post/sendCreateBeerPostRequest'; import UploadImageValidationSchema from '@/services/schema/ImageSchema/UploadImageValidationSchema'; -import sendUploadBeerImagesRequest from '@/requests/BeerImage/sendUploadBeerImageRequest'; +import sendUploadBeerImagesRequest from '@/requests/images/beer-image/sendUploadBeerImageRequest'; import toast from 'react-hot-toast'; diff --git a/src/components/EditBeerPostForm.tsx b/src/components/EditBeerPostForm.tsx index 63727a8..3f6ed0b 100644 --- a/src/components/EditBeerPostForm.tsx +++ b/src/components/EditBeerPostForm.tsx @@ -6,9 +6,9 @@ import { z } from 'zod'; import { useForm, SubmitHandler } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; -import deleteBeerPostRequest from '@/requests/BeerPost/deleteBeerPostRequest'; +import deleteBeerPostRequest from '@/requests/posts/beer-post/deleteBeerPostRequest'; import EditBeerPostValidationSchema from '@/services/posts/beer-post/schema/EditBeerPostValidationSchema'; -import sendEditBeerPostRequest from '@/requests/BeerPost/sendEditBeerPostRequest'; +import sendEditBeerPostRequest from '@/requests/posts/beer-post/sendEditBeerPostRequest'; import createErrorToast from '@/util/createErrorToast'; import Button from './ui/forms/Button'; import FormError from './ui/forms/FormError'; diff --git a/src/components/Login/LoginForm.tsx b/src/components/Login/LoginForm.tsx index 1c7fec9..f79bc0d 100644 --- a/src/components/Login/LoginForm.tsx +++ b/src/components/Login/LoginForm.tsx @@ -1,4 +1,4 @@ -import sendLoginUserRequest from '@/requests/User/sendLoginUserRequest'; +import sendLoginUserRequest from '@/requests/users/auth/sendLoginUserRequest'; import LoginValidationSchema from '@/services/users/auth/schema/LoginValidationSchema'; import { zodResolver } from '@hookform/resolvers/zod'; import { useRouter } from 'next/router'; diff --git a/src/components/RegisterUserForm.tsx b/src/components/RegisterUserForm.tsx index 588338e..4970bbb 100644 --- a/src/components/RegisterUserForm.tsx +++ b/src/components/RegisterUserForm.tsx @@ -1,4 +1,4 @@ -import sendRegisterUserRequest from '@/requests/User/sendRegisterUserRequest'; +import sendRegisterUserRequest from '@/requests/users/auth/sendRegisterUserRequest'; import { CreateUserValidationSchemaWithUsernameAndEmailCheck } from '@/services/users/auth/schema/CreateUserValidationSchemas'; import { zodResolver } from '@hookform/resolvers/zod'; import { useRouter } from 'next/router'; diff --git a/src/components/UserPage/UserFollowButton.tsx b/src/components/UserPage/UserFollowButton.tsx index 1f1dc58..0b0166c 100644 --- a/src/components/UserPage/UserFollowButton.tsx +++ b/src/components/UserPage/UserFollowButton.tsx @@ -1,7 +1,7 @@ import useFollowStatus from '@/hooks/data-fetching/user-follows/useFollowStatus'; import useGetUsersFollowedByUser from '@/hooks/data-fetching/user-follows/useGetUsersFollowedByUser'; import useGetUsersFollowingUser from '@/hooks/data-fetching/user-follows/useGetUsersFollowingUser'; -import sendUserFollowRequest from '@/requests/UserFollow/sendUserFollowRequest'; +import sendUserFollowRequest from '@/requests/users/auth/sendUserFollowRequest'; import GetUserSchema from '@/services/users/auth/schema/GetUserSchema'; import { FC, useState } from 'react'; import { FaUserCheck, FaUserPlus } from 'react-icons/fa'; diff --git a/src/pages/users/account/edit-profile.tsx b/src/pages/users/account/edit-profile.tsx index 70703c5..1dc0a1b 100644 --- a/src/pages/users/account/edit-profile.tsx +++ b/src/pages/users/account/edit-profile.tsx @@ -22,8 +22,8 @@ import useGetUsersFollowedByUser from '@/hooks/data-fetching/user-follows/useGet import useGetUsersFollowingUser from '@/hooks/data-fetching/user-follows/useGetUsersFollowingUser'; import UpdateProfileSchema from '@/services/users/auth/schema/UpdateProfileSchema'; -import sendUpdateUserAvatarRequest from '@/requests/Account/sendUpdateUserAvatarRequest'; -import sendUpdateUserProfileRequest from '@/requests/Account/sendUpdateUserProfileRequest'; +import sendUpdateUserAvatarRequest from '@/requests/users/profile/sendUpdateUserAvatarRequest'; +import sendUpdateUserProfileRequest from '@/requests/users/profile/sendUpdateUserProfileRequest'; import Spinner from '@/components/ui/Spinner'; const ProfilePage: NextPage = () => { diff --git a/src/pages/users/forgot-password.tsx b/src/pages/users/forgot-password.tsx index a68adc3..d27ca0a 100644 --- a/src/pages/users/forgot-password.tsx +++ b/src/pages/users/forgot-password.tsx @@ -12,7 +12,7 @@ import { NextPage } from 'next'; import { SubmitHandler, useForm } from 'react-hook-form'; import toast from 'react-hot-toast'; import { useRouter } from 'next/router'; -import sendForgotPasswordRequest from '@/requests/User/sendForgotPasswordRequest'; +import sendForgotPasswordRequest from '@/requests/users/auth/sendForgotPasswordRequest'; import { FaUserCircle } from 'react-icons/fa'; interface ForgotPasswordPageProps {} diff --git a/src/requests/BeerComment/sendCreateBeerCommentRequest.ts b/src/requests/comments/beer-comment/sendCreateBeerCommentRequest.ts similarity index 100% rename from src/requests/BeerComment/sendCreateBeerCommentRequest.ts rename to src/requests/comments/beer-comment/sendCreateBeerCommentRequest.ts diff --git a/src/requests/BeerStyleComment/sendCreateBeerStyleCommentRequest.ts b/src/requests/comments/beer-style-comment/sendCreateBeerStyleCommentRequest.ts similarity index 100% rename from src/requests/BeerStyleComment/sendCreateBeerStyleCommentRequest.ts rename to src/requests/comments/beer-style-comment/sendCreateBeerStyleCommentRequest.ts diff --git a/src/requests/BreweryComment/sendCreateBreweryCommentRequest.ts b/src/requests/comments/brewery-comment/sendCreateBreweryCommentRequest.ts similarity index 100% rename from src/requests/BreweryComment/sendCreateBreweryCommentRequest.ts rename to src/requests/comments/brewery-comment/sendCreateBreweryCommentRequest.ts diff --git a/src/requests/BeerImage/sendUploadBeerImageRequest.ts b/src/requests/images/beer-image/sendUploadBeerImageRequest.ts similarity index 100% rename from src/requests/BeerImage/sendUploadBeerImageRequest.ts rename to src/requests/images/beer-image/sendUploadBeerImageRequest.ts diff --git a/src/requests/BreweryImage/sendUploadBreweryImageRequest.ts b/src/requests/images/brewery-image/sendUploadBreweryImageRequest.ts similarity index 100% rename from src/requests/BreweryImage/sendUploadBreweryImageRequest.ts rename to src/requests/images/brewery-image/sendUploadBreweryImageRequest.ts diff --git a/src/requests/BeerPostLike/sendBeerPostLikeRequest.ts b/src/requests/likes/beer-post-like/sendBeerPostLikeRequest.ts similarity index 100% rename from src/requests/BeerPostLike/sendBeerPostLikeRequest.ts rename to src/requests/likes/beer-post-like/sendBeerPostLikeRequest.ts diff --git a/src/requests/BeerStyleLike/sendBeerStyleLikeRequest.ts b/src/requests/likes/beer-style-like/sendBeerStyleLikeRequest.ts similarity index 100% rename from src/requests/BeerStyleLike/sendBeerStyleLikeRequest.ts rename to src/requests/likes/beer-style-like/sendBeerStyleLikeRequest.ts diff --git a/src/requests/BreweryPostLike/sendBreweryPostLikeRequest.ts b/src/requests/likes/brewery-post-like/sendBreweryPostLikeRequest.ts similarity index 100% rename from src/requests/BreweryPostLike/sendBreweryPostLikeRequest.ts rename to src/requests/likes/brewery-post-like/sendBreweryPostLikeRequest.ts diff --git a/src/requests/BeerPost/deleteBeerPostRequest.ts b/src/requests/posts/beer-post/deleteBeerPostRequest.ts similarity index 100% rename from src/requests/BeerPost/deleteBeerPostRequest.ts rename to src/requests/posts/beer-post/deleteBeerPostRequest.ts diff --git a/src/requests/BeerPost/sendCreateBeerPostRequest.ts b/src/requests/posts/beer-post/sendCreateBeerPostRequest.ts similarity index 100% rename from src/requests/BeerPost/sendCreateBeerPostRequest.ts rename to src/requests/posts/beer-post/sendCreateBeerPostRequest.ts diff --git a/src/requests/BeerPost/sendEditBeerPostRequest.ts b/src/requests/posts/beer-post/sendEditBeerPostRequest.ts similarity index 100% rename from src/requests/BeerPost/sendEditBeerPostRequest.ts rename to src/requests/posts/beer-post/sendEditBeerPostRequest.ts diff --git a/src/requests/BreweryPost/sendCreateBreweryPostRequest.ts b/src/requests/posts/brewery-post/sendCreateBreweryPostRequest.ts similarity index 100% rename from src/requests/BreweryPost/sendCreateBreweryPostRequest.ts rename to src/requests/posts/brewery-post/sendCreateBreweryPostRequest.ts diff --git a/src/requests/User/sendEditUserRequest.ts b/src/requests/users/auth/sendEditUserRequest.ts similarity index 100% rename from src/requests/User/sendEditUserRequest.ts rename to src/requests/users/auth/sendEditUserRequest.ts diff --git a/src/requests/User/sendForgotPasswordRequest.ts b/src/requests/users/auth/sendForgotPasswordRequest.ts similarity index 100% rename from src/requests/User/sendForgotPasswordRequest.ts rename to src/requests/users/auth/sendForgotPasswordRequest.ts diff --git a/src/requests/User/sendLoginUserRequest.ts b/src/requests/users/auth/sendLoginUserRequest.ts similarity index 100% rename from src/requests/User/sendLoginUserRequest.ts rename to src/requests/users/auth/sendLoginUserRequest.ts diff --git a/src/requests/User/sendRegisterUserRequest.ts b/src/requests/users/auth/sendRegisterUserRequest.ts similarity index 100% rename from src/requests/User/sendRegisterUserRequest.ts rename to src/requests/users/auth/sendRegisterUserRequest.ts diff --git a/src/requests/User/sendUpdatePasswordRequest.ts b/src/requests/users/auth/sendUpdatePasswordRequest.ts similarity index 100% rename from src/requests/User/sendUpdatePasswordRequest.ts rename to src/requests/users/auth/sendUpdatePasswordRequest.ts diff --git a/src/requests/UserFollow/sendUserFollowRequest.ts b/src/requests/users/auth/sendUserFollowRequest.ts similarity index 100% rename from src/requests/UserFollow/sendUserFollowRequest.ts rename to src/requests/users/auth/sendUserFollowRequest.ts diff --git a/src/requests/User/validateEmailRequest.ts b/src/requests/users/auth/validateEmailRequest.ts similarity index 100% rename from src/requests/User/validateEmailRequest.ts rename to src/requests/users/auth/validateEmailRequest.ts diff --git a/src/requests/Account/sendUpdateUserAvatarRequest.ts b/src/requests/users/profile/sendUpdateUserAvatarRequest.ts similarity index 100% rename from src/requests/Account/sendUpdateUserAvatarRequest.ts rename to src/requests/users/profile/sendUpdateUserAvatarRequest.ts diff --git a/src/requests/Account/sendUpdateUserProfileRequest.ts b/src/requests/users/profile/sendUpdateUserProfileRequest.ts similarity index 100% rename from src/requests/Account/sendUpdateUserProfileRequest.ts rename to src/requests/users/profile/sendUpdateUserProfileRequest.ts diff --git a/src/requests/validateUsernameRequest.ts b/src/requests/users/profile/validateUsernameRequest.ts similarity index 100% rename from src/requests/validateUsernameRequest.ts rename to src/requests/users/profile/validateUsernameRequest.ts diff --git a/src/services/users/auth/schema/CreateUserValidationSchemas.ts b/src/services/users/auth/schema/CreateUserValidationSchemas.ts index 3d86980..38aae9e 100644 --- a/src/services/users/auth/schema/CreateUserValidationSchemas.ts +++ b/src/services/users/auth/schema/CreateUserValidationSchemas.ts @@ -1,5 +1,5 @@ -import validateEmailRequest from '@/requests/User/validateEmailRequest'; -import validateUsernameRequest from '@/requests/validateUsernameRequest'; +import validateEmailRequest from '@/requests/users/auth/validateEmailRequest'; +import validateUsernameRequest from '@/requests/users/profile/validateUsernameRequest'; import sub from 'date-fns/sub'; import { z } from 'zod';