Remove lead-owned apps#4648
Merged
Lezek123 merged 3 commits intoJoystream:apps-metaprotocolfrom Feb 20, 2023
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
drillprop
suggested changes
Feb 20, 2023
| const newApp = new App({ | ||
| name, | ||
| id: appId, | ||
| ownerMember: memberId ? new Membership({ id: memberId }) : undefined, |
Contributor
There was a problem hiding this comment.
I can't comment on line 16 on GitHub, but there is a redundant condition and a comment.
// memberId is required for MemberRemark, but not for LeadRemark
if (event.method === 'MemberRemarked' && !memberId) {
inconsistentState("memberId wasn't provided")
}We should update it as well
| @@ -55,29 +54,20 @@ export async function processUpdateAppMessage( | |||
| store: DatabaseManager, | |||
| event: SubstrateEvent, | |||
| @@ -102,29 +92,20 @@ export async function processDeleteAppMessage( | |||
| store: DatabaseManager, | |||
| event: SubstrateEvent, | |||
| assert.equal(appsByName?.[0].ownerMember.id, member.memberId.toString()) | ||
| assert.equal(appsByName?.[0]?.category, appMetadata.category) | ||
| assert.equal(appsByName?.[0]?.oneLiner, appMetadata.oneLiner) | ||
| assert.equal(appsByName?.[0]?.description, appMetadata.description) |
Contributor
There was a problem hiding this comment.
Maybe I'm nitpicking here, but we could rename all the variables like appOwnedByMember to just app or newApp. Just for the sake of clarity? WDYT? We don't need to differentiate anymore between the app owned by the lead and the app owned by members.
| @@ -43,35 +43,5 @@ export async function deleteApp({ api, query }: FlowProps): Promise<void> { | |||
| ) | |||
| } | |||
| @@ -61,51 +61,5 @@ export async function updateApp({ api, query }: FlowProps): Promise<void> { | |||
| } | |||
drillprop
approved these changes
Feb 20, 2023
Contributor
drillprop
left a comment
There was a problem hiding this comment.
Thanks for taking care of it! LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://discord.com/channels/811216481340751934/1035123033196732427/1075886121080336515