Skip to content

Commit

Permalink
debug lines
Browse files Browse the repository at this point in the history
  • Loading branch information
saw-jan committed Apr 25, 2024
1 parent bb20cbb commit 939c605
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions services/graph/pkg/service/v0/sharedwithme.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
func (g Graph) ListSharedWithMe(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
driveItems, err := g.listSharedWithMe(ctx)
// g.logger.Error().Err(err).Msg(fmt.Sprintf("%v", driveItems))
if err != nil {
g.logger.Error().Err(err).Msg("listSharedWithMe failed")
errorcode.RenderError(w, r, err)
Expand Down
5 changes: 5 additions & 0 deletions services/graph/pkg/service/v0/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"reflect"
Expand Down Expand Up @@ -195,7 +196,9 @@ func cs3ReceivedSharesToDriveItems(ctx context.Context,
if !driveItem.HasUIHidden() {
driveItem.SetUIHidden(false)
}
logger.Error().Err(err).Msg(fmt.Sprintf("[TEST_DEBUG]: HasClientSynchronize: %v", driveItem.HasClientSynchronize()))
if !driveItem.HasClientSynchronize() {
logger.Error().Err(err).Msg("[TEST_DEBUG]: HasClientSynchronize is false")
driveItem.SetClientSynchronize(false)
if name := shareStat.GetInfo().GetName(); name != "" {
driveItem.SetName(name)
Expand Down Expand Up @@ -347,6 +350,8 @@ func fillDriveItemPropertiesFromReceivedShare(ctx context.Context, logger *log.L
// flag enabled.
// Also we use the Mountpoint name of the first accepted mountpoint as the name for
// the driveItem
logger.Error().Err(err).Msg(fmt.Sprintf("[TEST_DEBUG]: receivedShare.GetState(): %v", receivedShare.GetState()))
logger.Error().Err(err).Msg(fmt.Sprintf("[TEST_DEBUG]: ShareState_SHARE_STATE_ACCEPTED: %v", collaboration.ShareState_SHARE_STATE_ACCEPTED))
if receivedShare.GetState() == collaboration.ShareState_SHARE_STATE_ACCEPTED {
driveItem.SetClientSynchronize(true)
if name := receivedShare.GetMountPoint().GetPath(); name != "" && driveItem.GetName() == "" {
Expand Down

0 comments on commit 939c605

Please sign in to comment.