MCPcopy Index your code
hub / github.com/tiny-pilot/tinypilot / login

Function login

app/static/js/controllers.js:276–289  ·  view source on GitHub ↗
(username, password)

Source from the content-addressed store, hash-verified

274}
275
276export async function login(username, password) {
277 return fetch("/api/auth", {
278 method: "POST",
279 headers: {
280 "X-CSRFToken": getCsrfToken(),
281 "Content-Type": "application/json",
282 },
283 credentials: "same-origin",
284 mode: "same-origin",
285 cache: "no-cache",
286 redirect: "error",
287 body: JSON.stringify({ username, password }),
288 }).then(processJsonResponse);
289}
290
291export async function logout() {
292 return fetch("/api/logout", {

Callers

nothing calls this directly

Calls 1

getCsrfTokenFunction · 0.85

Tested by

no test coverage detected