2022-09-16 00:28:32 +02:00
|
|
|
import define from '../define.js';
|
|
|
|
|
|
|
|
export const meta = {
|
|
|
|
tags: ['meta'],
|
|
|
|
|
|
|
|
requireCredential: false,
|
|
|
|
requireCredentialPrivateMode: true,
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
export const paramDef = {
|
|
|
|
type: 'object',
|
|
|
|
properties: {},
|
|
|
|
required: [],
|
|
|
|
} as const;
|
|
|
|
|
|
|
|
// eslint-disable-next-line import/no-default-export
|
|
|
|
export default define(meta, paramDef, async () => {
|
2022-09-16 00:32:25 +02:00
|
|
|
let tag_name;
|
2022-12-18 19:12:24 +01:00
|
|
|
await fetch('https://codeberg.org/api/v1/repos/calckey/calckey/releases?draft=false&pre-release=false&page=1&limit=1')
|
2022-09-16 00:23:08 +02:00
|
|
|
.then((response) => response.json())
|
2022-09-16 00:32:25 +02:00
|
|
|
.then((data) => {
|
|
|
|
tag_name = data[0].tag_name;
|
|
|
|
});
|
2022-09-16 00:28:32 +02:00
|
|
|
|
|
|
|
return {
|
|
|
|
tag_name,
|
|
|
|
};
|
|
|
|
});
|