mirror of
https://github.com/Fabio286/antares.git
synced 2025-01-24 22:48:04 +01:00
refactor: minor improvement in changelog parsing
This commit is contained in:
parent
5cb8ec65ad
commit
c7417809f4
@ -42,12 +42,16 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async getChangelog () {
|
async getChangelog () {
|
||||||
try {
|
try {
|
||||||
const apiRes = await fetch(`https://api.github.com/repos/Fabio286/antares/releases/tags/v${this.appVersion}`, {
|
const apiRes = await fetch(`https://api.github.com/repos/antares-sql/antares/releases/tags/v${this.appVersion}`, {
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
});
|
});
|
||||||
|
|
||||||
const { body } = await apiRes.json();
|
const { body } = await apiRes.json();
|
||||||
const markdown = body.substr(0, body.indexOf('### Download'));
|
const cutOffset = body.indexOf('### Download');
|
||||||
|
const markdown = cutOffset >= 0
|
||||||
|
? body.substr(0, cutOffset)
|
||||||
|
: body;
|
||||||
|
|
||||||
const renderer = {
|
const renderer = {
|
||||||
link (href, title, text) {
|
link (href, title, text) {
|
||||||
return text;
|
return text;
|
||||||
|
Loading…
Reference in New Issue
Block a user