-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: updates backend to match prettier formatting
- Loading branch information
1 parent
6af7672
commit 51b6e1e
Showing
11 changed files
with
132 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
import mongoose, { Schema } from "mongoose"; | ||
|
||
export type IBasket = { | ||
_id: Schema.Types.ObjectId; | ||
basketName: string; | ||
description: string; | ||
members: Schema.Types.ObjectId[] | null; | ||
items: Schema.Types.ObjectId[] | null; | ||
created: Date; | ||
_id: Schema.Types.ObjectId; | ||
basketName: string; | ||
description: string; | ||
members: Schema.Types.ObjectId[] | null; | ||
items: Schema.Types.ObjectId[] | null; | ||
created: Date; | ||
}; | ||
|
||
const BasketSchema = new Schema<IBasket>({ | ||
basketName: { type: String, required: true }, | ||
description: { type: String, required: true }, | ||
members: { type: [Schema.Types.ObjectId], required: true, default: [] }, | ||
items: { type: [Schema.Types.ObjectId], required: true, default: [] }, | ||
created: { type: Date, required: true, default: Date.now }, | ||
basketName: { type: String, required: true }, | ||
description: { type: String, required: true }, | ||
members: { type: [Schema.Types.ObjectId], required: true, default: [] }, | ||
items: { type: [Schema.Types.ObjectId], required: true, default: [] }, | ||
created: { type: Date, required: true, default: Date.now }, | ||
}); | ||
|
||
const Basket = mongoose.models["basket"] || mongoose.model("basket", BasketSchema); | ||
const Basket = | ||
mongoose.models["basket"] || mongoose.model("basket", BasketSchema); | ||
|
||
export default Basket; | ||
export default Basket; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
import mongoose, { Schema } from "mongoose"; | ||
|
||
export type IGroup = { | ||
_id: Schema.Types.ObjectId; | ||
groupName: string; | ||
privateGroup: boolean; | ||
description: string; | ||
members: Schema.Types.ObjectId[] | null; | ||
baskets: Schema.Types.ObjectId[] | null; | ||
created: Date; | ||
_id: Schema.Types.ObjectId; | ||
groupName: string; | ||
privateGroup: boolean; | ||
description: string; | ||
members: Schema.Types.ObjectId[] | null; | ||
baskets: Schema.Types.ObjectId[] | null; | ||
created: Date; | ||
}; | ||
|
||
const GroupSchema = new Schema<IGroup>({ | ||
groupName: { type: String, required: true }, | ||
privateGroup: { type: Boolean, required: true }, | ||
description: { type: String, required: true }, | ||
members: { type: [Schema.Types.ObjectId], required: true, default: [] }, | ||
baskets: { type: [Schema.Types.ObjectId], required: true, default: [] }, | ||
created: { type: Date, required: true, default: Date.now }, | ||
groupName: { type: String, required: true }, | ||
privateGroup: { type: Boolean, required: true }, | ||
description: { type: String, required: true }, | ||
members: { type: [Schema.Types.ObjectId], required: true, default: [] }, | ||
baskets: { type: [Schema.Types.ObjectId], required: true, default: [] }, | ||
created: { type: Date, required: true, default: Date.now }, | ||
}); | ||
|
||
const Group = mongoose.models["groups"] || mongoose.model("groups", GroupSchema); | ||
const Group = | ||
mongoose.models["groups"] || mongoose.model("groups", GroupSchema); | ||
|
||
export default Group; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.