blob: 00ff4a427b30f5c593a9ac0098198c7762c0b600 (
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'].trimEnd();
return new NotepadContent(title,message)
})
.catch(err => {
console.log(err)
return new NotepadContent(title,err.toString())
})
}
|