@@ -154,32 +154,30 @@ func (s *Service) actDecryptionHandler() func(h http.Handler) http.Handler {
154154// uploads the encrypted reference, history and kvs to the store.
155155func (s * Service ) actEncryptionHandler (
156156 ctx context.Context ,
157- w http.ResponseWriter ,
158157 putter storer.PutterSession ,
159158 reference swarm.Address ,
160159 historyRootHash swarm.Address ,
161- ) (swarm.Address , error ) {
160+ ) (swarm.Address , swarm. Address , error ) {
162161 publisherPublicKey := & s .publicKey
163162 ls := loadsave .New (s .storer .Download (true ), s .storer .Cache (), requestPipelineFactory (ctx , putter , false , redundancy .NONE ), redundancy .DefaultLevel )
164163 storageReference , historyReference , encryptedReference , err := s .accesscontrol .UploadHandler (ctx , ls , reference , publisherPublicKey , historyRootHash )
165164 if err != nil {
166- return swarm .ZeroAddress , err
165+ return swarm .ZeroAddress , swarm . ZeroAddress , err
167166 }
168167 // only need to upload history and kvs if a new history is created,
169168 // meaning that the publisher uploaded to the history for the first time
170169 if ! historyReference .Equal (historyRootHash ) {
171170 err = putter .Done (storageReference )
172171 if err != nil {
173- return swarm .ZeroAddress , fmt .Errorf ("done split key-value store failed: %w" , err )
172+ return swarm .ZeroAddress , swarm . ZeroAddress , fmt .Errorf ("done split key-value store failed: %w" , err )
174173 }
175174 err = putter .Done (historyReference )
176175 if err != nil {
177- return swarm .ZeroAddress , fmt .Errorf ("done split history failed: %w" , err )
176+ return swarm .ZeroAddress , swarm . ZeroAddress , fmt .Errorf ("done split history failed: %w" , err )
178177 }
179178 }
180179
181- w .Header ().Set (SwarmActHistoryAddressHeader , historyReference .String ())
182- return encryptedReference , nil
180+ return encryptedReference , historyReference , nil
183181}
184182
185183// actListGranteesHandler is a middleware that decrypts the given address and returns the list of grantees,
0 commit comments