Skip to content

Is it possible to cleanup the services? #10

Description

@GabeAboy

Can this be shared? That way the service functions can return structs and we can test them easier

`
response, err := json.Marshal(divisions)
if err != nil {
http.Error(w, "Error marshalling JSON", http.StatusInternalServerError)
return
}

w.WriteHeader(http.StatusOK)
_, err = w.Write(response)
if err != nil {
	http.Error(w, "Error writing response", http.StatusInternalServerError)
	return
}`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions