File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
server/api/registry/license-change Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ export function useLicenseChanges(
2323
2424 const result = useFetch < LicenseChangeResponse > ( url , {
2525 query : computed ( ( ) => ( { version : version . value } ) ) ,
26- watch : [ url , version ] ,
26+ key : `license-change:${ name . value } :${ version . value } ` ,
27+ watch : [ name , version ] ,
2728 } )
2829
2930 return result
Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ export default defineCachedEventHandler(
3939 statusMessage : 'Package metadata not found' ,
4040 } )
4141 }
42-
43- // 3. Process the logic (moved from your composable)
42+ // 3. Process the logic
4443 const versions = Object . values ( data . versions )
4544
4645 // Sort versions chronologically using the 'time' object
@@ -86,8 +85,8 @@ export default defineCachedEventHandler(
8685 // 2. Get the version (default to 'latest' if not provided)
8786 const version = query . version || 'latest'
8887
89- // 3. Create a unique string including the version
90- // Result : "license-change:v1:lodash:4.17.21 "
88+ // 3. Create a unique string such that it takes into account the pckage name and version
89+ // sample result : "license-change:v1:faker:2.1.15 "
9190 return `license-change:v2:${ cleanPkg } :${ version } `
9291 } ,
9392 } ,
You can’t perform that action at this time.
0 commit comments