@taiger-common/model 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,20 +40,7 @@ exports.EventSchema = {
40
40
  min: [new Date(), "time can't be before now!!"]
41
41
  },
42
42
  end: {
43
- type: Date,
43
+ type: Date
44
44
  // setting a min function to accept any date one hour ahead of start
45
- min: [
46
- function () {
47
- var date = new Date(this.start);
48
- var validDate = new Date(date.getTime() + 60000);
49
- return validDate;
50
- },
51
- 'Event End must be at least one minute a head of event time'
52
- ],
53
- default: function () {
54
- var date = new Date(this.start);
55
- var validDate = new Date(date.getTime() + 60000 * 30);
56
- return validDate;
57
- }
58
45
  }
59
46
  };
@@ -37,20 +37,7 @@ export var EventSchema = {
37
37
  min: [new Date(), "time can't be before now!!"]
38
38
  },
39
39
  end: {
40
- type: Date,
40
+ type: Date
41
41
  // setting a min function to accept any date one hour ahead of start
42
- min: [
43
- function () {
44
- var date = new Date(this.start);
45
- var validDate = new Date(date.getTime() + 60000);
46
- return validDate;
47
- },
48
- 'Event End must be at least one minute a head of event time'
49
- ],
50
- default: function () {
51
- var date = new Date(this.start);
52
- var validDate = new Date(date.getTime() + 60000 * 30);
53
- return validDate;
54
- }
55
42
  }
56
43
  };
@@ -1,5 +1,5 @@
1
1
  import { Schema } from 'mongoose';
2
- interface IEvent {
2
+ export interface IEvent {
3
3
  requester_id: string[];
4
4
  receiver_id: string[];
5
5
  isConfirmedRequester: boolean;
@@ -53,8 +53,5 @@ export declare const EventSchema: {
53
53
  };
54
54
  end: {
55
55
  type: DateConstructor;
56
- min: (string | ((this: IEvent) => Date))[];
57
- default: (this: IEvent) => Date;
58
56
  };
59
57
  };
60
- export {};