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

Updated delete organization endpoint functionality and implemented tests #1366

Merged
merged 10 commits into from
Jan 19, 2024

Conversation

AbdulWahab3181
Copy link
Contributor

@AbdulWahab3181 AbdulWahab3181 commented Jan 16, 2024

Describe your changes

5d1cb6a7-b096-4779-b9a7-014ef28e5888.mp4

Issue ticket number and link

Closes #1334

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested on Chrome and Firefox
  • I have tested on a mobile device
  • I have provided a screenshot or recording of changes in my PR if there were updates to the frontend

@AbdulWahab3181 AbdulWahab3181 marked this pull request as ready for review January 16, 2024 21:47
@ecurrencyhodler
Copy link
Contributor

There are a couple of conflicting files:
db/structs.go
handlers/organization_test.go

@AbdulWahab3181
Copy link
Contributor Author

There are a couple of conflicting files: db/structs.go handlers/organization_test.go

Resolved

@ecurrencyhodler
Copy link
Contributor

LGTM! Good job. Let's get a code review.

db/db.go Outdated

func (db database) UpdateOrganizationForDeletion(uuid string) error {
updates := map[string]interface{}{
"website": nil,
Copy link
Contributor

Choose a reason for hiding this comment

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

@AbdulWahab3181 change all nil to empty strings ""

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed

OwnerPubKey: "test-key",
Website: nil,
Github: nil,
Description: nil,
Copy link
Contributor

Choose a reason for hiding this comment

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

@AbdulWahab3181 change all nil to empty strings ""

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@elraphty But Our ticket scope is nill. Let me know if it still needs to be changed.

image image

Copy link
Contributor

Choose a reason for hiding this comment

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

Follow Raph's advice here @AbdulWahab3181

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed

Copy link
Contributor

Choose a reason for hiding this comment

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

@elraphty But Our ticket scope is nill. Let me know if it still needs to be changed.

image image

Yeah, but using nil may lead to GORM errors e.g

go-gorm/gorm#6351
go-gorm/gorm#3363

@elraphty elraphty merged commit aa41f56 into stakwork:master Jan 19, 2024
5 checks passed
@ecurrencyhodler
Copy link
Contributor

Nice work. Paid!

elraphty added a commit that referenced this pull request Jan 26, 2024
Updated delete organization endpoint functionality and implemented tests
elraphty added a commit that referenced this pull request Jan 26, 2024
Updated delete organization endpoint functionality and implemented tests
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.

Update "delete org" endpoint and functionality
3 participants