(ctx context.Context, req *uploadGraphEncryptKeysRequest)
| 646 | } |
| 647 | |
| 648 | func (s *server) uploadGraphEncryptKeys(ctx context.Context, req *uploadGraphEncryptKeysRequest) (*uploadGraphEncryptKeysResponse, error) { |
| 649 | err := s.db.AddGraphEncryptKey(ctx, db.GraphID(req.GraphUUID), &db.GraphEncryptKey{ |
| 650 | EncryptedPrivateKey: req.EncryptedPrivateKey, |
| 651 | PublicKey: req.PublicKey, |
| 652 | }) |
| 653 | if db.IsNotExists(err) { |
| 654 | return nil, httperr.NotFound("graph %q wasn't found", req.GraphUUID) |
| 655 | } else if err != nil { |
| 656 | return nil, httperr.Internal("failed to load graph salts: %w", err) |
| 657 | } |
| 658 | return &uploadGraphEncryptKeysResponse{}, nil |
| 659 | } |
| 660 | |
| 661 | type getAllFilesRequest struct { |
| 662 | GraphUUID string `json:"GraphUUID"` |
nothing calls this directly
no test coverage detected