Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
limivann committed Sep 12, 2024
1 parent c5ed954 commit 1399447
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
7 changes: 0 additions & 7 deletions apps/merch/src/db/mongodb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ export class NotFoundError {
}
}

export class ItemExistError {
message: string;
constructor(id = "") {
this.message = "Item with " + id + " already exists.";
}
}

// readTable scans the table for all entries
export const readTable = async<T extends Document>(model: Model<T>): Promise<T[]> => {
const response = await model.find().exec();
Expand Down
2 changes: 1 addition & 1 deletion apps/merch/src/models/Order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MongoOrder } from "../db";
export type OrderDocument = MongoOrder & Document;

const OrderSchema: Schema = new Schema<OrderDocument>({
_id: { type: String },
_id: { type: String, required: true },
items: [ OrderItemSchema ],
transactionId: { type: String, default: "" },
transactionTime: { type: String, default: null },
Expand Down

0 comments on commit 1399447

Please sign in to comment.