Changes
1 changed files (+10/-12)
-
-
@@ -30,6 +30,14 @@ },}) } func updateAuthError() *connect.Response[workspaceV2.UpdateResponse] { return connect.NewResponse(&workspaceV2.UpdateResponse{ Result: &workspaceV2.UpdateResponse_AuthenticationError{ AuthenticationError: &errorV1.AuthenticationError{}, }, }) } func (s *Service) Update( ctx context.Context, req *connect.Request[workspaceV2.UpdateRequest],
-
@@ -42,12 +50,7 @@header := req.Header() token, err := s.core.LoadTokenFromCookie(&header) if err != nil || token == nil { // TODO: AuthenticationError に切り替える return connect.NewResponse(&workspaceV2.UpdateResponse{ Result: &workspaceV2.UpdateResponse_SystemError{ SystemError: &errorV1.SystemError{}, }, }), nil return updateAuthError(), nil } tx, err := s.core.DB.Begin()
-
@@ -113,12 +116,7 @@user, err := token.FindUser(secret, users) if err != nil { logger.Warn("Malformed token found", "error", err) // TODO: AuthenticationError に切り替える return connect.NewResponse(&workspaceV2.UpdateResponse{ Result: &workspaceV2.UpdateResponse_SystemError{ SystemError: &errorV1.SystemError{}, }, }), nil return updateAuthError(), nil } if !slices.Contains(user.Permissions, types.Permission_PERMISSION_EDIT_WORKSPACE_PROFILE) {
-