Skip to content

Commit

Permalink
에러 유발시키는 코드 제거 (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaaz425 authored Jul 11, 2024
2 parents 43a8d26 + 447ccc9 commit caeb771
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
14 changes: 1 addition & 13 deletions src/types/user/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { ObjectId } from 'mongodb';

export type ModalState = {
modalStatus: boolean;
changeStatus: () => void;
Expand Down Expand Up @@ -36,23 +34,13 @@ export type useRegisterStoreProps = {
resetProfile: () => void;
};

export type dbUserData = {
_id: ObjectId;
id: string;
pw: string;
nickName: string;
email: string;
fileName: string;
currentMessage: string;
};

export type userData = {
email: string;
pw: string;
nickName: string;
profileImg: string;
};

export type dbUserProps = {
export type userProps = {
[key: string]: string;
};
9 changes: 3 additions & 6 deletions src/utils/database.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { userList } from '@/mocks/data/userList';
import { dbUserProps, userData } from '@/types/user';
import { userData, userProps } from '@/types/user';

export async function findUser({ searchData, searchSource }: dbUserProps) {
export async function findUser({ searchData, searchSource }: userProps) {
let data: userData | undefined;
switch (searchSource) {
case 'email':
Expand All @@ -15,10 +15,7 @@ export async function findUser({ searchData, searchSource }: dbUserProps) {
}

export async function registerUser(userData: userData) {
console.log('userData = ', userData);
console.log('before add userList = ', userList);
userList.push(userData);
console.log('after add userList = ', userList);
}

export async function updateUser({ emailid, data, key }: dbUserProps) {}
export async function updateUser({ emailid, data, key }: userProps) {}

0 comments on commit caeb771

Please sign in to comment.