Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Org extension create #500

Merged
merged 11 commits into from
Feb 1, 2024
Merged

Org extension create #500

merged 11 commits into from
Feb 1, 2024

Conversation

joffinjoy
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@aks30 aks30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed on 22 Jan


static async create(data, options = {}) {
try {
const newOrgExtension = await OrganizationExtension.create(data, options)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joffinjoy why is it not consistently camel case OrganizationExtension => organizationExtension

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is the standard that we have set for ourselves. All models will have starting letter as captials. It is the same for every other model.

@joffinjoy
Copy link
Collaborator Author

New envs:

EVENT_TYPE_CREATE='update'
EVENT_TYPE_UPDATE='create'
EVENT_TYPE_DELETE='delete'


static async createOrgExtension(eventBody) {
try {
const extensionData = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joffinjoy can we use the eventBody Object to upsert, instead of accessing and storing the fields


exports.eventListenerRouter = async (eventBody, { createFn = null, updateFn = null, deleteFn = null }) => {
try {
switch (eventBody.eventType) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joffinjoy for new event type we need to upset this ?

@rakeshSgr rakeshSgr merged commit 114d774 into develop Feb 1, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants