-
Notifications
You must be signed in to change notification settings - Fork 143
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
chore(core): refactor merchant data structure #3906
chore(core): refactor merchant data structure #3906
Conversation
0f34c14
to
a9c7c52
Compare
b3f5a10
to
266f77c
Compare
chore: remove redundant describe test: first integration test for add merchant chore: add migration (untested yet)
266f77c
to
d275287
Compare
when approved I will do a small iteration on the admin panel |
return merchants | ||
} | ||
|
||
// TODO: manage multiple merchants for a single username |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will be done on follow up PRs, right now it's mostly a refactor
core/api/src/graphql/admin/root/mutation/business-update-map-info.ts
Outdated
Show resolved
Hide resolved
id, | ||
}: { | ||
id: MerchantId | ||
}): Promise<void | ApplicationError> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In these sorts of cases we usually return true
instead of void
so that we don't miss any accidental early returns
}): Promise<void | ApplicationError> => { | |
}): Promise<true | ApplicationError> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a good point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems there are other place in the codebase that have Promise<void
return | ||
} | ||
|
||
export const deleteMerchantByUsername = async ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit, consistent naming
export const deleteMerchantByUsername = async ({ | |
export const deleteMerchantLocationsByUsername = async ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to keep it deleteMerchantByUsername
for now because there is no dis-association as of now between a merchant and a location
moving the title/coordinate out of Account and into its own collection.
This is - in follow up PR - enables: