File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
app/lib/package/api_export Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -259,17 +259,21 @@ final class ExportedJsonFile<T> extends ExportedObject {
259259 this ._maxAge,
260260 ) : super ._(_owner, _objectName);
261261
262- /// Write [data] as gzipped JSON in UTF-8 format.
263- Future <void > write (T data) async {
264- final gzipped = _jsonGzip.encode (data);
265- final metadata = ObjectMetadata (
262+ ObjectMetadata _metadata () {
263+ return ObjectMetadata (
266264 contentType: 'application/json; charset="utf-8"' ,
267265 contentEncoding: 'gzip' ,
268266 cacheControl: 'public, max-age=${_maxAge .inSeconds }' ,
269267 custom: {
270268 'updated' : clock.now ().toIso8601String (),
271269 },
272270 );
271+ }
272+
273+ /// Write [data] as gzipped JSON in UTF-8 format.
274+ Future <void > write (T data) async {
275+ final gzipped = _jsonGzip.encode (data);
276+ final metadata = _metadata ();
273277
274278 await Future .wait (_owner._prefixes.map ((prefix) async {
275279 await _owner._pool.withResource (() async {
You can’t perform that action at this time.
0 commit comments