MCPcopy Create free account
hub / github.com/tiny-pilot/tinypilot / getLatestRelease

Function getLatestRelease

app/static/js/controllers.js:62–78  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60}
61
62export async function getLatestRelease() {
63 return fetch("/api/latestRelease", {
64 method: "GET",
65 mode: "same-origin",
66 cache: "no-cache",
67 redirect: "error",
68 })
69 .then(processJsonResponse)
70 .then((updateInfo) => {
71 ["version", "kind", "data"].forEach((field) => {
72 if (!Object.hasOwn(updateInfo, field)) {
73 throw new ControllerError(`Missing expected ${field} field`);
74 }
75 });
76 return updateInfo;
77 });
78}
79
80export async function getVersion() {
81 return fetch("/api/version", {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected