Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
students
travel
Commits
ca4f7ed1
Commit
ca4f7ed1
authored
Jul 11, 2022
by
Lee Soobeom
Browse files
unique 삭제
parent
876339ac
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/models/posting.model.ts
View file @
ca4f7ed1
...
@@ -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 발생
);
);
...
...
src/models/user.model.ts
View file @
ca4f7ed1
...
@@ -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
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment