Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Sep 22, 2021
1 parent 8cb06fe commit df3de6c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/http/services/appprovider/appprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) {
_, ocmderr, err := statRef(ctx, provider.Reference{Path: r.URL.Query().Get("container")}, client)
if err != nil {
log.Error().Err(err).Msg("error statting container")
ocmd.WriteError(w, r, ocmderr, "Container not found",
errtypes.NotFound("Container not found"))
ocmd.WriteError(w, r, ocmderr, "Container not found", errtypes.NotFound("Container not found"))
return
}
// Create empty file via storageprovider: obtain the HTTP URL for a PUT
Expand Down Expand Up @@ -201,8 +200,7 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) {
statRes, ocmderr, err := statRef(ctx, provider.Reference{Path: target}, client)
if err != nil {
log.Error().Err(err).Msg("error statting created file")
ocmd.WriteError(w, r, ocmderr, "Created file not found",
errtypes.NotFound("Created file not found"))
ocmd.WriteError(w, r, ocmderr, "Created file not found", errtypes.NotFound("Created file not found"))
return
}
js, err := json.Marshal(map[string]interface{}{"file_id": statRes.Id})
Expand Down Expand Up @@ -232,7 +230,8 @@ func (s *svc) handleList(w http.ResponseWriter, r *http.Request) {
return
}
if listRes.Status.Code != rpc.Code_CODE_OK {
ocmd.WriteError(w, r, ocmd.APIErrorServerError, "error listing supported mime types", status.NewErrorFromCode(listRes.Status.Code, "appprovider"))
ocmd.WriteError(w, r, ocmd.APIErrorServerError, "error listing supported mime types",
status.NewErrorFromCode(listRes.Status.Code, "appprovider"))
return
}

Expand Down Expand Up @@ -276,7 +275,8 @@ func (s *svc) handleOpen(w http.ResponseWriter, r *http.Request) {
return
}
if openRes.Status.Code != rpc.Code_CODE_OK {
ocmd.WriteError(w, r, ocmd.APIErrorServerError, "error opening resource information", status.NewErrorFromCode(openRes.Status.Code, "appprovider"))
ocmd.WriteError(w, r, ocmd.APIErrorServerError, "error opening resource information",
status.NewErrorFromCode(openRes.Status.Code, "appprovider"))
return
}

Expand Down

0 comments on commit df3de6c

Please sign in to comment.