Commit ca4f7ed1 authored by Lee Soobeom's avatar Lee Soobeom
Browse files

unique 삭제

parent 876339ac
......@@ -13,25 +13,20 @@ const postingSchema = new Schema<PostingType>(
title: {
type: String,
required: true,
unique: true,
},
text: {
type: String,
required: true,
unique: true,
},
theme: {
type: String,
unique: true,
},
city: {
type: String,
unique: true,
},
// username: {
// type: String,
// unique: true,
// },
username: {
type: String,
},
} // username 때문에 duplicate key error 발생
);
......
......@@ -17,7 +17,7 @@ const schema = new Schema<IUser>(
email: {
type: String, //mongoose type인 String으로 일반적인 string과는 겉으로는 대문자 차이
rquired: true,
unique: true,
.: true,
validate: [validateEmail, "이메일을 입력해주세요"],
},
name: { type: String },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment