Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
zizdlp committed Aug 17, 2024
1 parent 1063a03 commit 5a68a3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion zbook_backend/gapi/markdown_get_markdown_content.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"

"github.com/rs/zerolog/log"
db "github.com/zizdlp/zbook/db/sqlc"
"github.com/zizdlp/zbook/pb/models"
"github.com/zizdlp/zbook/pb/rpcs"
Expand Down Expand Up @@ -61,7 +62,9 @@ func (server *Server) GetMarkdownContent(ctx context.Context, req *rpcs.GetMarkd
}
prev, next, err := config.FindAdjacentPaths(req.GetLang(), req.GetRelativePath())
if err != nil {
return nil, status.Errorf(codes.Internal, "FindAdjacentPaths error : %s", err)
log.Error().Err(err).Msg("FindAdjacentPaths error")
prev = ""
next = ""
}

rsp := &rpcs.GetMarkdownContentResponse{
Expand Down
2 changes: 1 addition & 1 deletion zbook_backend/gapi/repo_find_first_document.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (server *Server) GetFirstDocument(ctx context.Context, req *rpcs.GetFirstDo
}
relative_path, err := config.GetFirstDocument(req.GetLang())
if err != nil {
return nil, status.Errorf(codes.Internal, "FindAdjacentPaths error : %s", err)
return nil, status.Errorf(codes.Internal, "GetFirstDocument error : %s", err)
}

rsp := &rpcs.GetFirstDocumentResponse{
Expand Down
2 changes: 1 addition & 1 deletion zbook_backend/statik/statik.go

Large diffs are not rendered by default.

0 comments on commit 5a68a3d

Please sign in to comment.