Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
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
Show whitespace changes
Inline
Side-by-side
src/models/posting.model.ts
View file @
ca4f7ed1
...
...
@@ -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 발생
);
...
...
src/models/user.model.ts
View file @
ca4f7ed1
...
...
@@ -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
},
...
...
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