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

unique 삭제

parent 876339ac
...@@ -13,25 +13,20 @@ const postingSchema = new Schema<PostingType>( ...@@ -13,25 +13,20 @@ const postingSchema = new Schema<PostingType>(
title: { title: {
type: String, type: String,
required: true, required: true,
unique: true,
}, },
text: { text: {
type: String, type: String,
required: true, required: true,
unique: true,
}, },
theme: { theme: {
type: String, type: String,
unique: true,
}, },
city: { city: {
type: String, type: String,
unique: true,
}, },
// username: { username: {
// type: String, type: String,
// unique: true, },
// },
} // username 때문에 duplicate key error 발생 } // username 때문에 duplicate key error 발생
); );
......
...@@ -17,7 +17,7 @@ const schema = new Schema<IUser>( ...@@ -17,7 +17,7 @@ const schema = new Schema<IUser>(
email: { email: {
type: String, //mongoose type인 String으로 일반적인 string과는 겉으로는 대문자 차이 type: String, //mongoose type인 String으로 일반적인 string과는 겉으로는 대문자 차이
rquired: true, rquired: true,
unique: true, .: true,
validate: [validateEmail, "이메일을 입력해주세요"], validate: [validateEmail, "이메일을 입력해주세요"],
}, },
name: { type: String }, 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