File tree Expand file tree Collapse file tree 1 file changed +41
-1
lines changed Expand file tree Collapse file tree 1 file changed +41
-1
lines changed Original file line number Diff line number Diff line change 11import currentPackage from '~~/package.json'
22
3+ export interface ReleasesLatest {
4+ url : string
5+ assets_url : string
6+ upload_url : string
7+ html_url : string
8+ id : number
9+ author : {
10+ login : string
11+ id : number
12+ node_id : string
13+ avatar_url : string
14+ gravatar_id : string
15+ url : string
16+ html_url : string
17+ followers_url : string
18+ following_url : string
19+ gists_url : string
20+ starred_url : string
21+ subscriptions_url : string
22+ organizations_url : string
23+ repos_url : string
24+ events_url : string
25+ received_events_url : string
26+ type : string
27+ site_admin : boolean
28+ }
29+ node_id : string
30+ tag_name : string
31+ target_commitish : string
32+ name : string
33+ draft : boolean
34+ prerelease : boolean
35+ created_at : string
36+ published_at : string
37+ assets : Array < any >
38+ tarball_url : string
39+ zipball_url : string
40+ body : string
41+ }
42+
343export default defineEventHandler ( async ( ) => {
4- const latestReleases = await $fetch < typeof currentPackage > ( 'https://api.github.com/repos/hywax/mafl/releases/latest' , {
44+ const latestReleases = await $fetch < ReleasesLatest > ( 'https://api.github.com/repos/hywax/mafl/releases/latest' , {
545 parseResponse : ( json ) => JSON . parse ( json ) ,
646 } )
747 const latestVersion = latestReleases . tag_name . replace ( 'v' , '' )
You can’t perform that action at this time.
0 commit comments