Skip to content

Commit

Permalink
added item to cart data
Browse files Browse the repository at this point in the history
adamalshaick committed Mar 1, 2019
1 parent b48c8f7 commit a11ea36
Showing 3 changed files with 7 additions and 25 deletions.
2 changes: 1 addition & 1 deletion client/src/components/sell-item/SellItem.js
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ class SellItem extends Component {
newItem.append("title", this.state.title);
newItem.append("category", this.state.category);

this.props.addItem(newItem);
this.props.addItem(newItem, this.props.history);
this.setState({
text: "",
price: "",
26 changes: 6 additions & 20 deletions models/Profile.js
Original file line number Diff line number Diff line change
@@ -21,26 +21,8 @@ const ProfileSchema = new Schema({
type: String
},

social: {
youtube: {
type: String
},

twitter: {
type: String
},

facebook: {
type: String
},

linkedin: {
type: String
},

instagram: {
type: String
}
profileImage: {
type: String
},

cart: {
@@ -50,6 +32,10 @@ const ProfileSchema = new Schema({
type: Schema.Types.ObjectId,
ref: "users"
},
item: {
type: Schema.Types.ObjectId,
ref: "items"
},
text: {
type: String,
required: true
4 changes: 0 additions & 4 deletions models/User.js
Original file line number Diff line number Diff line change
@@ -18,10 +18,6 @@ const UserSchema = new Schema({
required: true
},

avatar: {
type: String
},

date: {
type: String,
default: Date.now

0 comments on commit a11ea36

Please sign in to comment.