Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Repo/Listing.go: Refactor CreateListing and UpdateListing #1712

@cpacia

Description

@cpacia

Both CreateListing and UpdateListing are nearly identical in repo/listing.go. The only difference is the check for whether the listing exists and whether a slug is created or not. It's likely these two functions can be refactored to avoid duplication and for clarity.

Also, the name of CreateListing is misleading because it is not persisting anything to disk. Only returning a new Listing object. Thus is might be better named NewListing and just be used as a constructor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ethereumEthereum integration-related issues.internalUnder-the-hood issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions