Skip to content

Declouple Controller from MongoDB #8

Open
@marcosvidolin

Description

Hi,

We have a MongoDB dependency in the controller. You can see here: https://github.com/amitshekhariitbhu/go-backend-clean-architecture/blob/main/api/controller/task_controller.go#L8
Maybe we should consider move the code bellow to other layer:

task.ID = primitive.NewObjectID()
task.UserID, err = primitive.ObjectIDFromHex(userID)

What's your thoughts?

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions