@@ -394,7 +394,7 @@ const getAPIContextId = async () => {
394
394
* Get a revision by its ID.
395
395
*/
396
396
export const getRevision = cache ( {
397
- name : 'api.getRevision.v3 ' ,
397
+ name : 'api.getRevision.v2 ' ,
398
398
tag : ( spaceId , revisionId , fetchOptions ) =>
399
399
// Temporary hack to make it work with OpenAPI on v1
400
400
fetchOptions . tags ?. [ 0 ] ??
@@ -427,7 +427,7 @@ export const getRevision = cache({
427
427
return cacheResponse ( response , {
428
428
...( fetchOptions . metadata ? cacheTtl_7days : cacheTtl_1day ) ,
429
429
data : {
430
- revision : response . data ,
430
+ ... response . data ,
431
431
tags : getResponseCacheTags ( response ) ,
432
432
} ,
433
433
} ) ;
@@ -439,7 +439,7 @@ export const getRevision = cache({
439
439
* Get all the pages in a revision of a space.
440
440
*/
441
441
export const getRevisionPages = cache ( {
442
- name : 'api.getRevisionPages.v5 ' ,
442
+ name : 'api.getRevisionPages.v4 ' ,
443
443
tag : ( spaceId , revisionId , fetchOptions ) =>
444
444
// Temporary hack to make it work with OpenAPI on v1
445
445
fetchOptions . tags ?. [ 0 ] ??
@@ -471,7 +471,7 @@ export const getRevisionPages = cache({
471
471
472
472
return cacheResponse ( response , {
473
473
...( fetchOptions . metadata ? cacheTtl_7days : cacheTtl_1day ) ,
474
- data : { pages : response . data . pages , tags : getResponseCacheTags ( response ) } ,
474
+ data : { ... response . data , tags : getResponseCacheTags ( response ) } ,
475
475
} ) ;
476
476
} ,
477
477
getKeyArgs : ( args ) => [ args [ 0 ] , args [ 1 ] ] ,
@@ -663,7 +663,7 @@ export const getRevisionFile = batch<[string, string, string], RevisionFile | nu
663
663
let files : Record < string , RevisionFile > = { } ;
664
664
665
665
if ( hasRevisionInMemory ) {
666
- const { revision } = await getRevision ( spaceId , revisionId , { metadata : false } ) ;
666
+ const revision = await getRevision ( spaceId , revisionId , { metadata : false } ) ;
667
667
files = { } ;
668
668
revision . files . forEach ( ( file ) => {
669
669
files [ file . id ] = file ;
@@ -709,7 +709,7 @@ export const getReusableContent = async (
709
709
} ) ;
710
710
711
711
if ( hasRevisionInMemory ) {
712
- const { revision } = await getRevision ( spaceId , revisionId , { metadata : false } ) ;
712
+ const revision = await getRevision ( spaceId , revisionId , { metadata : false } ) ;
713
713
return (
714
714
revision . reusableContents . find (
715
715
( reusableContent ) => reusableContent . id === reusableContentId
0 commit comments