Skip to content

Commit 6445f57

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into issue-2829
2 parents 96ea0be + eca60ae commit 6445f57

File tree

4 files changed

+208
-8
lines changed

4 files changed

+208
-8
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Docusaurus related
2+
.docusaurus
3+
14
# Add the auto-generated docs to .gitignore as the same are created by GitHub actions
25
docs/Schema.md
36
docs/schema.json

sample_data/posts.json

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,5 +287,209 @@
287287
"createdAt": "2023-04-13T05:17:14.396Z",
288288
"updatedAt": "2023-04-13T05:17:14.396Z",
289289
"__v": 0
290+
},
291+
{
292+
"_id": "6589bdd92caa9d8d69087513",
293+
"status": "ACTIVE",
294+
"likedBy": [],
295+
"comments": [],
296+
"likeCount": 0,
297+
"commentCount": 0,
298+
"pinned": true,
299+
"text": "Capturing the tranquility of snowflakes dancing in the crisp winter air.",
300+
"title": "Snowflake Serenity",
301+
"creatorId": "6589389d2caa9d8d69087487",
302+
"organization": "6537904485008f171cf29924",
303+
"imageUrl": null,
304+
"createdAt": "2023-04-13T05:17:14.396Z",
305+
"updatedAt": "2023-04-13T05:17:14.396Z",
306+
"__v": 0
307+
},
308+
{
309+
"_id": "6589bdd92caa9d8d69087502",
310+
"status": "ACTIVE",
311+
"likedBy": [],
312+
"comments": [],
313+
"likeCount": 0,
314+
"commentCount": 0,
315+
"pinned": true,
316+
"text": "Exploring the magic of winter nights with shimmering stars lighting up a frosty wonderland.",
317+
"title": "Starry Winter Nights",
318+
"creatorId": "6589389d2caa9d8d69087487",
319+
"organization": "6537904485008f171cf29924",
320+
"imageUrl": null,
321+
"createdAt": "2023-04-02T05:17:14.396Z",
322+
"updatedAt": "2023-04-02T05:17:14.396Z",
323+
"__v": 0
324+
},
325+
{
326+
"_id": "6589bdd92caa9d8d69087503",
327+
"status": "ACTIVE",
328+
"likedBy": [],
329+
"comments": [],
330+
"likeCount": 0,
331+
"commentCount": 0,
332+
"pinned": true,
333+
"text": "The charm of early spring peeking through the snow, a hint of rebirth in a cold embrace.",
334+
"title": "Spring's Whisper in Winter",
335+
"creatorId": "6589389d2caa9d8d69087487",
336+
"organization": "6537904485008f171cf29924",
337+
"imageUrl": null,
338+
"createdAt": "2023-04-03T05:17:14.396Z",
339+
"updatedAt": "2023-04-03T05:17:14.396Z",
340+
"__v": 0
341+
},
342+
{
343+
"_id": "6589bdd92caa9d8d69087504",
344+
"status": "ACTIVE",
345+
"likedBy": [],
346+
"comments": [],
347+
"likeCount": 0,
348+
"commentCount": 0,
349+
"pinned": true,
350+
"text": "A snowy path leads to warm stories by the fire—wintertime tales of joy and togetherness.",
351+
"title": "Snowy Path to Warmth",
352+
"creatorId": "6589387e2caa9d8d69087485",
353+
"organization": "6437904485008f171cf29924",
354+
"imageUrl": null,
355+
"createdAt": "2023-04-04T05:17:14.396Z",
356+
"updatedAt": "2023-04-04T05:17:14.396Z",
357+
"__v": 0
358+
},
359+
{
360+
"_id": "6589bdd92caa9d8d69087505",
361+
"status": "ACTIVE",
362+
"likedBy": [],
363+
"comments": [],
364+
"likeCount": 0,
365+
"commentCount": 0,
366+
"pinned": true,
367+
"text": "Frosty mornings awaken the spirit of adventure, trekking through the snow-clad wilderness.",
368+
"title": "Frosty Morning Treks",
369+
"creatorId": "6589387e2caa9d8d69087485",
370+
"organization": "6437904485008f171cf29924",
371+
"imageUrl": null,
372+
"createdAt": "2023-04-05T05:17:14.396Z",
373+
"updatedAt": "2023-04-05T05:17:14.396Z",
374+
"__v": 0
375+
},
376+
{
377+
"_id": "6589bdd92caa9d8d69087506",
378+
"status": "ACTIVE",
379+
"likedBy": [],
380+
"comments": [],
381+
"likeCount": 0,
382+
"commentCount": 0,
383+
"pinned": true,
384+
"text": "The joy of building snowmen with loved ones, memories frozen in time.",
385+
"title": "Snowman Chronicles",
386+
"creatorId": "6589387e2caa9d8d69087485",
387+
"organization": "6437904485008f171cf29924",
388+
"imageUrl": null,
389+
"createdAt": "2023-04-06T05:17:14.396Z",
390+
"updatedAt": "2023-04-06T05:17:14.396Z",
391+
"__v": 0
392+
},
393+
{
394+
"_id": "6589bdd92caa9d8d69087507",
395+
"status": "ACTIVE",
396+
"likedBy": [],
397+
"comments": [],
398+
"likeCount": 0,
399+
"commentCount": 0,
400+
"pinned": true,
401+
"text": "Skiing down majestic slopes, a thrilling embrace of nature’s winter canvas.",
402+
"title": "Skiing Adventures",
403+
"creatorId": "658930fd2caa9d8d6908745c",
404+
"organization": "6437904485008f171cf29924",
405+
"imageUrl": null,
406+
"createdAt": "2023-04-07T05:17:14.396Z",
407+
"updatedAt": "2023-04-07T05:17:14.396Z",
408+
"__v": 0
409+
},
410+
{
411+
"_id": "6589bdd92caa9d8d69087508",
412+
"status": "ACTIVE",
413+
"likedBy": [],
414+
"comments": [],
415+
"likeCount": 0,
416+
"commentCount": 0,
417+
"pinned": true,
418+
"text": "Winter brings its culinary wonders, a feast of comfort and joy.",
419+
"title": "Winter Feast Delights",
420+
"creatorId": "658930fd2caa9d8d6908745c",
421+
"organization": "6437904485008f171cf29924",
422+
"imageUrl": null,
423+
"createdAt": "2023-04-08T05:17:14.396Z",
424+
"updatedAt": "2023-04-08T05:17:14.396Z",
425+
"__v": 0
426+
},
427+
{
428+
"_id": "6589bdd92caa9d8d69087509",
429+
"status": "ACTIVE",
430+
"likedBy": [],
431+
"comments": [],
432+
"likeCount": 0,
433+
"commentCount": 0,
434+
"pinned": true,
435+
"text": "Exploring frozen lakes and finding reflections of serenity in icy waters.",
436+
"title": "Reflections on Ice",
437+
"creatorId": "658930fd2caa9d8d6908745c",
438+
"organization": "6437904485008f171cf29924",
439+
"imageUrl": null,
440+
"createdAt": "2023-04-09T05:17:14.396Z",
441+
"updatedAt": "2023-04-09T05:17:14.396Z",
442+
"__v": 0
443+
},
444+
{
445+
"_id": "6589bdd92caa9d8d69087510",
446+
"status": "ACTIVE",
447+
"likedBy": [],
448+
"comments": [],
449+
"likeCount": 0,
450+
"commentCount": 0,
451+
"pinned": true,
452+
"text": "The quiet beauty of snow-covered forests, where nature whispers its secrets.",
453+
"title": "Snowy Forest Tales",
454+
"creatorId": "64378abd85008f171cf2990d",
455+
"organization": "6437904485008f171cf29924",
456+
"imageUrl": null,
457+
"createdAt": "2023-04-10T05:17:14.396Z",
458+
"updatedAt": "2023-04-10T05:17:14.396Z",
459+
"__v": 0
460+
},
461+
{
462+
"_id": "6589bdd92caa9d8d69087511",
463+
"status": "ACTIVE",
464+
"likedBy": [],
465+
"comments": [],
466+
"likeCount": 0,
467+
"commentCount": 0,
468+
"pinned": true,
469+
"text": "Witnessing the ethereal glow of the northern lights in the heart of winter.",
470+
"title": "Aurora Borealis Bliss",
471+
"creatorId": "64378abd85008f171cf2990d",
472+
"organization": "6437904485008f171cf29924",
473+
"imageUrl": null,
474+
"createdAt": "2023-04-11T05:17:14.396Z",
475+
"updatedAt": "2023-04-11T05:17:14.396Z",
476+
"__v": 0
477+
},
478+
{
479+
"_id": "6589bdd92caa9d8d69087512",
480+
"status": "ACTIVE",
481+
"likedBy": [],
482+
"comments": [],
483+
"likeCount": 0,
484+
"commentCount": 0,
485+
"pinned": true,
486+
"text": "A journey through winter markets, where warmth meets festivity.",
487+
"title": "Winter Market Magic",
488+
"creatorId": "64378abd85008f171cf2990d",
489+
"organization": "6437904485008f171cf29924",
490+
"imageUrl": null,
491+
"createdAt": "2023-04-12T05:17:14.396Z",
492+
"updatedAt": "2023-04-12T05:17:14.396Z",
493+
"__v": 0
290494
}
291495
]

src/resolvers/Mutation/togglePostPin.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import mongoose from "mongoose";
22
import {
33
LENGTH_VALIDATION_ERROR,
4-
PLEASE_PROVIDE_TITLE,
54
POST_NOT_FOUND_ERROR,
65
USER_NOT_AUTHORIZED_ERROR,
76
USER_NOT_AUTHORIZED_TO_PIN,
@@ -188,12 +187,6 @@ export const togglePostPin: MutationResolvers["togglePostPin"] = async (
188187
return updatedPost as InterfacePost;
189188
} else {
190189
// Pin the post if it is not currently pinned
191-
if (!args.title) {
192-
throw new errors.InputValidationError(
193-
requestContext.translate(PLEASE_PROVIDE_TITLE.MESSAGE),
194-
PLEASE_PROVIDE_TITLE.CODE,
195-
);
196-
}
197190

198191
// Validate the title length if provided
199192
if (args?.title) {

tests/utilities/loadSampleData.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe("Sample Data Import Tests", () => {
4343

4444
expect(userCount).toBe(15);
4545
expect(organizationCount).toBe(4);
46-
expect(postCount).toBe(17);
46+
expect(postCount).toBe(29);
4747
expect(eventCount).toBe(17280);
4848
expect(venueCount).toBe(4);
4949
expect(recurrenceRuleCount).toBe(100);

0 commit comments

Comments
 (0)