diff --git a/assets/app.js b/assets/app.js index 3d1f8e1..f854b94 100644 --- a/assets/app.js +++ b/assets/app.js @@ -12,6 +12,11 @@ var API = "https://api.corben.world/functions/da0474ea-4e56-405c-9f0d-35c3e4037a69/invoke" + "?token=97cd624cd2bd6a74eb692a940e71851f"; +var PHOTO_KINDS = ["head shot", "profile", "full body", "sitting", + "playing", "sleeping", "action", "other"]; +// A plate is built from a head-on shot; these are the ones worth having. +var REFERENCE_KINDS = ["head shot", "profile", "full body"]; + async function api(action, payload) { var body = Object.assign({ action: action }, payload || {}); var res; @@ -27,7 +32,6 @@ async function api(action, payload) { var outer; try { outer = await res.json(); } catch (e) { return { ok: false, error: "The server sent something unreadable." }; } - // The invoke route wraps the function result. return outer && outer.result ? outer.result : outer; } @@ -55,7 +59,8 @@ function esc(s) { function navBar(current) { var email = Session.get(); - var links = [["/", "Home", "home"], ["/create.html", "New video", "create"], ["/videos.html", "My videos", "videos"]]; + var links = [["/", "Home", "home"], ["/pets.html", "My pets", "pets"], + ["/create.html", "New video", "create"], ["/videos.html", "My videos", "videos"]]; var html = '