Skip to content

Commit

Permalink
Added Sample Data For AgendaCategory & Removed Delete Fund/Campaign M…
Browse files Browse the repository at this point in the history
…utations (#2511)

* Add default agendaCategories

* remove removeFund mutation

* removed removeFundraisingCampaign Mutation

* Add test coverage for errorTypes
  • Loading branch information
GlenDsza authored Sep 8, 2024
1 parent 0e711c6 commit b4099b9
Show file tree
Hide file tree
Showing 15 changed files with 142 additions and 744 deletions.
46 changes: 46 additions & 0 deletions sample_data/agendaCategories.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"_id": "66dc0ef89eb305badd7f5af6",
"name": "Default",
"description": "Default action item category",
"organizationId": "6437904485008f171cf29924",
"createdBy": "64378abd85008f171cf2990d",
"updatedBy": "64378abd85008f171cf2990d",
"createdAt": "2024-01-30T05:16:52.827Z",
"updatedAt": "2024-01-30T05:16:52.827Z",
"__v": 0
},
{
"_id": "66dc0ef89eb305badd7f5af7",
"name": "Default",
"description": "Default action item category",
"organizationId": "6537904485008f171cf29924",
"createdBy": "64378abd85008f171cf2990d",
"updatedBy": "64378abd85008f171cf2990d",
"createdAt": "2024-01-30T05:16:52.827Z",
"updatedAt": "2024-01-30T05:16:52.827Z",
"__v": 0
},
{
"_id": "66dc0ef89eb305badd7f5af8",
"name": "Default",
"description": "Default action item category",
"organizationId": "6637904485008f171cf29924",
"createdBy": "64378abd85008f171cf2990d",
"updatedBy": "64378abd85008f171cf2990d",
"createdAt": "2024-01-30T05:16:52.827Z",
"updatedAt": "2024-01-30T05:16:52.827Z",
"__v": 0
},
{
"_id": "66dc0ef89eb305badd7f5af9",
"name": "Default",
"description": "Default action item category",
"organizationId": "6737904485008f171cf29924",
"createdBy": "64378abd85008f171cf2990d",
"updatedBy": "64378abd85008f171cf2990d",
"createdAt": "2024-01-30T05:16:52.827Z",
"updatedAt": "2024-01-30T05:16:52.827Z",
"__v": 0
}
]
2 changes: 0 additions & 2 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1147,8 +1147,6 @@ type Mutation {
removeEventAttendee(data: EventAttendeeInput!): User!
removeEventVolunteer(id: ID!): EventVolunteer!
removeEventVolunteerGroup(id: ID!): EventVolunteerGroup!
removeFund(id: ID!): Fund!
removeFundraisingCampaign(id: ID!): FundraisingCampaign!
removeFundraisingCampaignPledge(id: ID!): FundraisingCampaignPledge!
removeGroupChat(chatId: ID!): GroupChat!
removeMember(data: UserAndOrganizationInput!): Organization!
Expand Down
4 changes: 2 additions & 2 deletions src/resolvers/Mutation/forgotPassword.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const forgotPassword: MutationResolvers["forgotPassword"] = async (
const { userOtp, newPassword, otpToken } = args.data;

try {
await jwt.verify(otpToken, ACCESS_TOKEN_SECRET as string);
} catch (error) {
jwt.verify(otpToken, ACCESS_TOKEN_SECRET as string);
} catch {
throw new Error(INVALID_OTP);
}

Expand Down
4 changes: 0 additions & 4 deletions src/resolvers/Mutation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ import { removeDirectChat } from "./removeDirectChat";
import { removeEvent } from "./removeEvent";
import { removeEventAttendee } from "./removeEventAttendee";
import { removeEventVolunteer } from "./removeEventVolunteer";
import { removeFund } from "./removeFund";
import { removeEventVolunteerGroup } from "./removeEventVolunteerGroup";
import { removeFundraisingCampaign } from "./removeFundraisingCampaign";
import { removeFundraisingCampaignPledge } from "./removeFundraisingCampaingPledge";
import { removeGroupChat } from "./removeGroupChat";
import { removeMember } from "./removeMember";
Expand Down Expand Up @@ -199,7 +197,6 @@ export const Mutation: MutationResolvers = {
removeEvent,
removeEventAttendee,
removeEventVolunteer,
removeFund,
removeEventVolunteerGroup,
removeGroupChat,
removeMember,
Expand Down Expand Up @@ -247,6 +244,5 @@ export const Mutation: MutationResolvers = {
updateFundraisingCampaign,
updateFundraisingCampaignPledge,
createFundraisingCampaignPledge,
removeFundraisingCampaign,
removeFundraisingCampaignPledge,
};
161 changes: 0 additions & 161 deletions src/resolvers/Mutation/removeFund.ts

This file was deleted.

Loading

0 comments on commit b4099b9

Please sign in to comment.