mirror of
https://github.com/sern-handler/gui
synced 2026-06-06 01:16:54 +00:00
12 lines
403 B
TypeScript
12 lines
403 B
TypeScript
import { app } from "electron"
|
|
|
|
export default async function updateChecker() {
|
|
const getLatest = await fetch('https://api.github.com/repos/sern-handler/gui/releases/latest')
|
|
.then(res => res.json())
|
|
|
|
if (`v${app.getVersion()}` !== getLatest.tag_name) {
|
|
return { version: getLatest.tag_name as string, url: getLatest.html_url as string }
|
|
} else {
|
|
return false
|
|
}
|
|
} |