Skip to content

Commit

Permalink
Revert "add constant for milliseconds in a week"
Browse files Browse the repository at this point in the history
This reverts commit 0476a35.
  • Loading branch information
meetulr committed Jan 28, 2024
1 parent 76e6982 commit 0d56d46
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/models/ActionItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Schema, model, models } from "mongoose";
import type { InterfaceUser } from "./User";
import type { InterfaceEvent } from "./Event";
import type { InterfaceActionItemCategory } from "./ActionItemCategory";
import { MILLISECONDS_IN_A_WEEK } from "../constants";

/**
* This is an interface that represents a database(MongoDB) document for ActionItem.
Expand Down Expand Up @@ -34,8 +33,8 @@ export interface InterfaceActionItem {
* @param preCompletionNotes - Notes prior to completion.
* @param postCompletionNotes - Notes on completion.
* @param assignmentDate - Date of assignment.
* @param dueDate - Due date (defaults to one week from creation).
* @param completionDate - Completion date (defaults to one week from creation).
* @param dueDate - Due date.
* @param completionDate - Completion date.
* @param isCompleted - Whether the ActionItem has been completed.
* @param eventId - Event to which the ActionItem is related, refer to the `Event` model.
* @param creatorId - User who created the ActionItem, refer to the `User` model.
Expand Down Expand Up @@ -74,12 +73,12 @@ const actionItemSchema = new Schema(
dueDate: {
type: Date,
required: true,
default: Date.now() + MILLISECONDS_IN_A_WEEK,
default: Date.now() + 7 * 24 * 60 * 60 * 1000,
},
completionDate: {
type: Date,
required: true,
default: Date.now() + MILLISECONDS_IN_A_WEEK,
default: Date.now() + 7 * 24 * 60 * 60 * 1000,
},
isCompleted: {
type: Boolean,
Expand Down

0 comments on commit 0d56d46

Please sign in to comment.