Commit 0dd2c747 authored by Fernando Takagi's avatar Fernando Takagi
Browse files

check empty request

parent 8bc5b2e4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -423,6 +423,10 @@ type storageQueryArg struct {
}

func StorageReadObjects(ctx context.Context, logger *zap.Logger, db *sql.DB, caller uuid.UUID, objectIDs []*api.ReadStorageObjectId) (*api.StorageObjects, error) {
	if objectIDs == nil || len(objectIDs) == 0 {
		return &api.StorageObjects{}, nil
	}

	collectionParams := make([]string, 0, len(objectIDs))
	keyParams := make([]string, 0, len(objectIDs))
	userIdParams := make([]uuid.UUID, 0, len(objectIDs))