blob: 9d2b523229d1631a5bb8408ee62b5de3c798afd3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import http from '@/utils/http'
import { NotepadContent } from "@/views/index/Notepad/type";
export const changelog = async ():Promise<NotepadContent> =>
{
const title = "Changelog"
return http.get('https://api.github.com/repos/HydroRoll-Team/HydroRoll/releases/latest')
.then(res => {
const message = "## " + res.data['tag_name'] + "\n" + res.data['body'];
return new NotepadContent(title,message)
})
.catch(err => {
console.log(err)
return new NotepadContent(title,err.toString())
})
}
|