playov2-js-utilities 0.3.4 → 0.3.5
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.
- package/lib/notification-templates.js +5 -2
- package/lib/notification.config.js +3 -2
- package/package.json +1 -1
- package/test.js +0 -8
|
@@ -204,12 +204,15 @@ const host_cancelled_activity = {
|
|
|
204
204
|
notificationId: notificationIds.ACTIVITY_CANCEL
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
+
/**
|
|
208
|
+
*
|
|
209
|
+
*/
|
|
207
210
|
const activity_reminder = {
|
|
208
211
|
heading: '⏰, Activity reminder!',
|
|
209
212
|
text: 'You have a {sport_name}} game coming up on {{date}}. Best of luck!',
|
|
210
213
|
buttons: [],
|
|
211
|
-
notificationId:
|
|
212
|
-
}
|
|
214
|
+
notificationId: notificationIds.ACTIVITY_REMINDER
|
|
215
|
+
};
|
|
213
216
|
|
|
214
217
|
const host_updated_activity_details = {
|
|
215
218
|
// ??
|
|
@@ -17,7 +17,8 @@ const notificationChannels = {
|
|
|
17
17
|
'activity_suggestions': '3ab98c37-b93c-4d39-ab55-bb2cc6279cb8', // done - 1 notifications tagged
|
|
18
18
|
'expenses': '1eb30f33-2b3b-40ce-8798-fce55c1275e2', // done - 6 notifications tagged
|
|
19
19
|
'groups_manage_requests': '83c024d1-2cb7-47fa-989d-1d8ef343a51c', // done - 6 notifications tagged
|
|
20
|
-
'group_updates': '9e023a20-deab-4bc4-bd33-08a8d9316322' // done - 3 notifications tagged
|
|
20
|
+
'group_updates': '9e023a20-deab-4bc4-bd33-08a8d9316322', // done - 3 notifications tagged
|
|
21
|
+
'activity_reminders': '53c55399-a73c-4800-b824-3c750ac57b98'
|
|
21
22
|
};
|
|
22
23
|
|
|
23
24
|
// ------------------------------------------ Exported (public) -----------------------------------------//
|
|
@@ -440,7 +441,7 @@ const config = {
|
|
|
440
441
|
title: "Activity Reminder",
|
|
441
442
|
type: ["push", "drawer"],
|
|
442
443
|
buttons: [],
|
|
443
|
-
android_channel_id:
|
|
444
|
+
android_channel_id: notificationChannels.activity_reminders
|
|
444
445
|
}
|
|
445
446
|
};
|
|
446
447
|
|
package/package.json
CHANGED
package/test.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const data = [{"_id":"619b64773f930c6f90778f94","location":"Indiranagar","hostId":"1b7887d3-8255-409b-9efe-89b64b701862","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":false,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"9a8942e0-9778-4c43-befd-c8f7de4d3985","sportId":"SP5","date":"2021-11-22T00:00:00.000Z","timing":2,"pals":[{"noshow":false,"noshowSwitch":false,"rating":5,"newPlaypal":false,"firstRatedOn":"2021-11-22T09:36:20.000Z","isRemoved":false,"userPresent":null,"palId":"1b7887d3-8255-409b-9efe-89b64b701862","reputation":[{"reputationId":0,"value":1},{"reputationId":1,"value":1},{"reputationId":2,"value":1}],"timestamp":"2021-11-22T09:36:20.000Z"}],"createdTS":"2021-11-22T09:35:51.013Z","modTS":"2021-11-22T09:36:20.095Z","__v":0},{"_id":"619b6c5b8fff1950a20adae2","location":"Jayanagar, Bengaluru","hostId":"a458fa2e-37e8-4e9d-beb1-3b4e68e5d56e","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"5161229a-e82d-498a-beed-8e2bc50bcaf7","sportId":"SP5","date":"2021-11-22T00:00:00.000Z","timing":1,"pals":[{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":false,"isRemoved":false,"userPresent":null,"palId":"a458fa2e-37e8-4e9d-beb1-3b4e68e5d56e","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-11-22T10:09:31.719Z"},{"noshow":false,"noshowSwitch":false,"rating":5,"newPlaypal":false,"isRemoved":false,"userPresent":null,"palId":"1b7887d3-8255-409b-9efe-89b64b701862","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-11-22T10:24:02.000Z"}],"createdTS":"2021-11-22T10:09:31.719Z","modTS":"2021-11-22T11:26:49.742Z","__v":0},{"_id":"619b85378fff1950a20adaf0","location":"Indiranagar","hostId":"1b7887d3-8255-409b-9efe-89b64b701862","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"00f9ff64-214c-470d-b7fb-760a6a3af8e0","sportId":"SP5","date":"2021-11-22T00:00:00.000Z","timing":2,"pals":[{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":false,"isRemoved":false,"userPresent":null,"palId":"1b7887d3-8255-409b-9efe-89b64b701862","reputation":[{"reputationId":0,"value":1},{"reputationId":1,"value":1},{"reputationId":2,"value":1}],"timestamp":"2021-11-22T12:00:26.000Z"},{"noshow":false,"noshowSwitch":false,"rating":3,"newPlaypal":false,"isRemoved":false,"userPresent":null,"palId":"a458fa2e-37e8-4e9d-beb1-3b4e68e5d56e","reputation":[{"reputationId":0,"value":1},{"reputationId":1,"value":1},{"reputationId":2,"value":1}],"timestamp":"2021-11-22T12:02:57.000Z"},{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":false,"isRemoved":false,"userPresent":null,"palId":"88d8e6ed-207a-4b98-ace7-73a7bd6bc900","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-11-22T11:55:35.344Z"}],"createdTS":"2021-11-22T11:55:35.345Z","modTS":"2021-11-22T12:09:46.320Z","__v":0},{"_id":"612502919345581b9bd0246b","location":"Maker, Bihar, India","hostId":"65a91715-396c-4049-a952-2cc56a100f4a","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"4dbf9ef5-c3a7-4542-8a6d-9241a02b4965","sportId":"SP5","date":"2021-08-24T00:00:00.000Z","timing":2,"pals":[{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":true,"isRemoved":false,"userPresent":null,"palId":"65a91715-396c-4049-a952-2cc56a100f4a","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-08-24T14:30:41.439Z"},{"noshow":false,"noshowSwitch":false,"rating":5,"newPlaypal":false,"isRemoved":false,"userPresent":null,"palId":"a458fa2e-37e8-4e9d-beb1-3b4e68e5d56e","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-08-24T14:31:01.000Z"},{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":false,"isRemoved":true,"userPresent":null,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-08-24T14:30:41.439Z","userName":"playo user"}],"createdTS":"2021-08-24T14:30:41.439Z","modTS":"2021-11-18T07:03:29.356Z","__v":0},{"_id":"6038ffa7cc84a76c119f1333","location":"Maker, Bihar","hostId":"d1ba3771-0255-41bf-9889-e222c97e986b","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"a1c4ae44-2667-42f9-ac37-dd173b2fa3b1","sportId":"SP5","date":"2021-02-26T00:00:00.000Z","startTime":"2021-02-26T14:00:00.916Z","endTime":"2021-02-26T14:30:00.916Z","timing":2,"pals":[{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":false,"isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-02-26T14:03:19.486Z","userName":"playo user"},{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":false,"isRemoved":true,"palId":"54fe8420-dae7-4bb2-aa08-320b7dc40794","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-02-26T14:03:19.485Z","userName":"playo user"},{"noshow":false,"noshowSwitch":false,"rating":5,"newPlaypal":false,"isRemoved":false,"palId":"a458fa2e-37e8-4e9d-beb1-3b4e68e5d56e","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-02-26T14:04:25.000Z"}],"createdTS":"2021-02-26T14:03:19.486Z","modTS":"2021-11-18T07:09:26.826Z","__v":0},{"_id":"6015a56cc8be9072376d7f0d","location":"Maker, Bihar","hostId":"d1ba3771-0255-41bf-9889-e222c97e986b","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"00879220-bd24-4635-add2-ce4b997be0fe","sportId":"SP5","date":"2021-01-30T00:00:00.000Z","timing":3,"pals":[{"noshow":false,"noshowSwitch":false,"rating":4,"newPlaypal":false,"firstRatedOn":"2021-02-02T13:36:32.000Z","isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":1},{"reputationId":1,"value":1},{"reputationId":2,"value":1}],"timestamp":"2021-02-02T13:36:32.000Z","userName":"playo user"},{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":false,"firstRatedOn":null,"isRemoved":false,"palId":"da0df07e-5cdb-4cbc-9b47-a31812aa3be7","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-01-30T18:29:00.257Z"},{"noshow":false,"noshowSwitch":false,"rating":2,"newPlaypal":false,"firstRatedOn":"2021-02-02T14:00:09.000Z","isRemoved":true,"palId":"54fe8420-dae7-4bb2-aa08-320b7dc40794","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-02-02T14:00:09.000Z","userName":"playo user"}],"createdTS":"2021-01-30T18:29:00.258Z","modTS":"2021-11-18T07:09:26.826Z","__v":0},{"_id":"5f9c32a49739b90adc3579b0","location":"BTM Layout","hostId":"d1ba3771-0255-41bf-9889-e222c97e986b","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"d3e71dc8-1aa6-4e32-b10d-50d4b084df31","sportId":"SP5","date":"2020-10-30T00:00:00.000Z","timing":2,"pals":[{"noshow":false,"noshowSwitch":false,"rating":1,"newPlaypal":false,"firstRatedOn":"2021-02-03T08:19:09.000Z","isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":0},{"reputationId":1,"value":0},{"reputationId":2,"value":0}],"timestamp":"2021-02-03T08:20:04.000Z","userName":"playo user"}],"createdTS":"2020-10-30T15:35:00.552Z","modTS":"2021-11-18T07:03:29.356Z","__v":0},{"_id":"5f9c32a49739b90adc3579b2","location":"BTM Layout, Bengaluru","hostId":"54fe8420-dae7-4bb2-aa08-320b7dc40794","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"1d624dfb-38aa-423d-b587-868740d9b5b7","sportId":"SP5","date":"2020-10-30T00:00:00.000Z","timing":2,"pals":[{"noshow":false,"noshowSwitch":false,"rating":3,"newPlaypal":false,"isRemoved":true,"palId":"54fe8420-dae7-4bb2-aa08-320b7dc40794","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-02-03T08:19:52.000Z","firstRatedOn":"2021-02-03T08:19:52.000Z","userName":"playo user"}],"createdTS":"2020-10-30T15:35:00.562Z","modTS":"2021-11-18T07:09:26.826Z","__v":0},{"_id":"5f6e0e24b61c8b4468f21759","location":"Qatar - Dubai - United Arab Emirates","hostId":"d1ba3771-0255-41bf-9889-e222c97e986b","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"26927e38-56de-4b2e-8c57-dd01abe8109f","sportId":"SP5","date":"2020-09-25T00:00:00.000Z","timing":2,"pals":[{"noshow":false,"noshowSwitch":false,"rating":5,"newPlaypal":false,"isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2020-09-27T12:28:45.000Z","userName":"playo user"}]
|
|
2
|
-
,"createdTS":"2020-09-25T15:35:00.313Z","modTS":"2021-11-18T07:03:29.356Z","__v":0},{"_id":"5efaf808a4b1425a240c2a85","location":"Dribble Arena, Magrath Road","hostId":"2537e208-35f2-4b38-ac65-081ab1a249be","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"7176dd7c-8424-43b8-95f4-a21148141bae","sportId":"SP5","date":"2020-06-30T00:00:00.000Z","startTime":"2020-06-30T07:30:00.000Z","endTime":"2020-06-30T08:30:00.000Z","timing":1,"pals":[{"noshow":false,"noshowSwitch":false,"rating":3,"newPlaypal":false,"firstRatedOn":"2020-07-02T12:52:32.000Z","isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":1},{"reputationId":1,"value":0},{"reputationId":2,"value":1}],"timestamp":"2020-07-02T12:57:53.000Z","userName":"playo user"}],"createdTS":"2020-06-30T08:30:00.348Z","modTS":"2021-11-18T07:03:29.356Z","__v":0},{"_id":"5ee10a8a9a0d8d7d0c611715","location":"Dribble Arena Test,Indiranagar","hostId":"d1ba3771-0255-41bf-9889-e222c97e986b","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"17266219-0b62-4edc-acd3-5775379e7143","sportId":"SP5","date":"2020-06-10T00:00:00.000Z","startTime":"2020-06-10T15:30:00.000Z","endTime":"2020-06-10T16:30:00.000Z","timing":3,"pals":[{"noshow":false,"noshowSwitch":false,"rating":4,"newPlaypal":false,"isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2020-06-11T04:30:06.000Z","userName":"playo user"}],"createdTS":"2020-06-10T16:30:02.175Z","modTS":"2021-11-18T07:03:29.356Z","__v":0},{"_id":"5ede59780b1f934f45df242a","location":"Dribble Arena Test,Indiranagar","hostId":"2537e208-35f2-4b38-ac65-081ab1a249be","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"dcc3a75f-2841-4317-b4c2-88159285027f","sportId":"SP5","date":"2020-06-08T00:00:00.000Z","startTime":"2020-06-08T11:30:00.000Z","endTime":"2020-06-08T12:30:00.000Z","timing":2,"pals":[{"noshow":false,"noshowSwitch":false,"rating":5,"newPlaypal":false,"isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2020-06-09T03:53:07.000Z","userName":"playo user"},{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":false,"isRemoved":false,"palId":"861c3457-c99c-4dbb-ab2c-5eb447eaf9fe","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2020-06-08T15:30:00.261Z"}],"createdTS":"2020-06-08T15:30:00.262Z","modTS":"2021-11-18T07:03:29.356Z","__v":0},{"_id":"5edbdf7cf164da32c113b35b","location":"Game Theory - 100 feet road - Indiranagar, 100 Feet Road","hostId":"a458fa2e-37e8-4e9d-beb1-3b4e68e5d56e","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"ee87f1fb-31b0-4640-b718-5b2557c9104f","sportId":"SP5","date":"2020-06-06T00:00:00.000Z","timing":3,"pals":[{"noshow":false,"noshowSwitch":false,"rating":4,"newPlaypal":true,"isRemoved":false,"palId":"a458fa2e-37e8-4e9d-beb1-3b4e68e5d56e","reputation":[{"reputationId":0,"value":1},{"reputationId":1,"value":1},{"reputationId":2,"value":1}],"timestamp":"2020-06-08T17:01:37.000Z"}],"createdTS":"2020-06-06T18:25:00.148Z","modTS":"2020-06-08T18:25:00.227Z","__v":0},{"_id":"5edbdf7df164da32c113b362","location":"BTM Layout","hostId":"2537e208-35f2-4b38-ac65-081ab1a249be","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"e70f154d-6663-401f-922b-a98f737cf0e4","sportId":"SP5","date":"2020-06-06T00:00:00.000Z","timing":3,"pals":[{"noshow":true,"noshowSwitch":false,"rating":4,"newPlaypal":false,"isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2020-06-09T03:54:28.000Z","firstRatedOn":"2020-06-09T03:54:28.000Z","userName":"playo user"}],"createdTS":"2020-06-06T18:25:01.155Z","modTS":"2021-11-18T07:03:29.356Z","__v":0},{"_id":"5ed5d5c8ec9f4b7276ef8d7e","location":"Dribble Arena Test,Indiranagar","hostId":"d1ba3771-0255-41bf-9889-e222c97e986b","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"f2c4ce11-bde0-45f7-aae9-a470ded10530","sportId":"SP5","date":"2020-06-02T00:00:00.000Z","startTime":"2020-06-02T03:30:00.000Z","endTime":"2020-06-02T04:30:00.000Z","timing":1,"pals":[{"noshow":false,"noshowSwitch":false,"rating":3,"newPlaypal":false,"isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2020-06-02T08:22:16.000Z","userName":"playo user"}],"createdTS":"2020-06-02T04:30:00.768Z","modTS":"2021-11-18T07:03:29.356Z","__v":0},{"_id":"5ed51ef8749cca727da39f6b","location":"Mekur Hosakeri","hostId":"2537e208-35f2-4b38-ac65-081ab1a249be","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"b76c1f0b-ed02-46c3-847e-c2ed0230f44b","sportId":"SP5","date":"2020-06-01T00:00:00.000Z","timing":2,"pals":[{"noshow":true,"noshowSwitch":false,"rating":5,"newPlaypal":false,"firstRatedOn":"2020-06-04T11:16:18.000Z","isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":1},{"reputationId":1,"value":1},{"reputationId":2,"value":-1}],"timestamp":"2020-06-04T11:16:23.000Z","userName":"playo user"}],"createdTS":"2020-06-01T15:30:00.186Z","modTS":"2021-11-18T07:03:29.356Z","__v":0},{"_id":"5ed4cafb417f305b48c80d58","location":"Magrath Road, Shanthala Nagar","hostId":"2537e208-35f2-4b38-ac65-081ab1a249be","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":true,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"efb5ee60-ab12-41f4-babf-099b50b2d7ea","sportId":"SP5","date":"2020-05-30T00:00:00.000Z","timing":2,"pals":[{"noshow":false,"noshowSwitch":false,"rating":5,"newPlaypal":true,"isRemoved":false,"palId":"861c3457-c99c-4dbb-ab2c-5eb447eaf9fe","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2020-06-05T20:38:34.000Z","firstRatedOn":"2020-06-05T20:38:12.000Z"},{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":false,"isRemoved":true,"palId":"d1ba3771-0255-41bf-9889-e222c97e986b","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2020-06-01T09:31:39.326Z","userName":"playo user"},{"noshow":false,"noshowSwitch":false,"rating":2,"newPlaypal":true,"isRemoved":true,"palId":"54fe8420-dae7-4bb2-aa08-320b7dc40794","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2020-06-10T09:41:20.000Z","firstRatedOn":"2020-06-10T09:41:20.000Z","userName":"playo user"},{"noshow":false,"noshowSwitch":false,"rating":0,"newPlaypal":true,"isRemoved":false,"palId":"2d617f4d-7be2-4fe7-be3a-7c09fd7e513c","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2020-06-01T09:31:39.325Z"}],"createdTS":"2020-06-01T09:31:39.326Z","modTS":"2021-11-18T07:09:26.826Z","__v":0},{"_id":"619b94008fff1950a20adaf2","location":"Indiranagar","hostId":"1b7887d3-8255-409b-9efe-89b64b701862","matchHappened":true,"matchRating":-1,"userPlayed":true,"expired":false,"cancelled":false,"noshow":false,"removed":false,"userId":"2537e208-35f2-4b38-ac65-081ab1a249be","activityId":"afabf002-5260-4248-b200-cedbcbe3fc59","sportId":"SP5","date":"2021-11-22T00:00:00.000Z","startTime":"2021-11-22T13:30:00.794Z","endTime":"2021-11-22T14:00:00.794Z","timing":2,"pals":[{"noshow":true,"noshowSwitch":false,"rating":0,"newPlaypal":false,"firstRatedOn":null,"isRemoved":false,"userPresent":null,"palId":"1b7887d3-8255-409b-9efe-89b64b701862","reputation":[{"reputationId":0,"value":1},{"reputationId":1,"value":1},{"reputationId":2,"value":1}],"timestamp":"2021-11-22T12:58:40.047Z"},{"noshow":true,"noshowSwitch":false,"rating":0,"newPlaypal":false,"firstRatedOn":null,"isRemoved":false,"userPresent":null,"palId":"a458fa2e-37e8-4e9d-beb1-3b4e68e5d56e","reputation":[{"reputationId":0,"value":-1},{"reputationId":1,"value":-1},{"reputationId":2,"value":-1}],"timestamp":"2021-11-22T12:58:40.047Z"}],"createdTS":"2021-11-22T12:58:40.047Z","modTS":"2021-11-22T13:00:41.806Z","__v":0}];
|
|
3
|
-
|
|
4
|
-
const ratingTest = require("./lib/ratings/index");
|
|
5
|
-
|
|
6
|
-
const test = ratingTest.getUserRecentRatings(data, 4);
|
|
7
|
-
|
|
8
|
-
console.log(test, data.length);
|