fix: remove some TODO messages

This commit is contained in:
Juan Pablo Villafáñez
2024-03-22 14:39:51 +01:00
parent c163e668c9
commit 5c85daa06c
4 changed files with 6 additions and 8 deletions

View File

@@ -103,7 +103,6 @@ func (c *ContentConnector) GetFile(ctx context.Context, writer io.Writer) error
// public link downloads have the token in the download endpoint
httpReq.Header.Add("X-Reva-Transfer", downloadToken)
}
// TODO: the access token shouldn't be needed
httpReq.Header.Add("X-Access-Token", wopiContext.AccessToken)
httpResp, err := httpClient.Do(httpReq)
@@ -276,7 +275,6 @@ func (c *ContentConnector) PutFile(ctx context.Context, stream io.Reader, stream
// public link uploads have the token in the upload endpoint
httpReq.Header.Add("X-Reva-Transfer", uploadToken)
}
// TODO: the access token shouldn't be needed
httpReq.Header.Add("X-Access-Token", wopiContext.AccessToken)
httpReq.Header.Add("X-Lock-Id", lockID)

View File

@@ -189,9 +189,12 @@ func (f *FileConnector) Lock(ctx context.Context, lockID, oldLockID string) (str
return resp.GetLock().GetLockId(), nil
}
// TODO: Is this the right error code?
logger.Error().Msg("SetLock failed and could not refresh")
return "", NewConnectorError(404, "Could not refresh the lock")
return "", NewConnectorError(500, "Could not refresh the lock")
case rpcv1beta1.Code_CODE_NOT_FOUND:
logger.Error().Msg("SetLock failed, file not found")
return "", NewConnectorError(404, "File not found")
default:
logger.Error().

View File

@@ -54,9 +54,7 @@ func GetAppURLs(cfg *config.Config, logger log.Logger) (map[string]map[string]st
return nil, errors.Wrap(err, "error parsing wopi discovery response")
}
// TODO: Log appUrls? not easy with the format
// It's also a one-time call during service setup, so it's pointless
// to use an "all-is-good" debug log
// We won't log anything if successful
return appURLs, nil
}

View File

@@ -43,7 +43,6 @@ func RegisterAppProvider(
Str("AppName", cfg.App.Name).
Strs("Mimetypes", mimeTypes).
Msg("Registering mimetypes in the app provider")
// TODO: REVA has way to filter supported mimetypes (do we need to implement it here or is it in the registry?)
// TODO: an added app provider shouldn't last forever. Instead the registry should use a TTL
// and delete providers that didn't register again. If an app provider dies or get's disconnected,