MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / saveProfile

Function saveProfile

deployments/desktop/static/app.js:1266–1288  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1264}
1265
1266async function saveProfile() {
1267 const userId = $("profileUserId").value.trim();
1268 const pdfPaths = $("pdfPaths").value
1269 .split(";")
1270 .map((item) => item.trim())
1271 .filter(Boolean);
1272 setStatus("保存画像", true);
1273 const data = await api("/api/profile", {
1274 method: "POST",
1275 body: JSON.stringify({
1276 user_id: userId,
1277 natural_language: $("naturalLanguage").value,
1278 scholar_url: $("scholarUrl").value,
1279 homepage_url: $("homepageUrl").value,
1280 pdf_paths: pdfPaths,
1281 reset_existing: $("resetProfile").checked,
1282 }),
1283 });
1284 await loadUsers(userId);
1285 setActiveUser(userId);
1286 renderProfile(data.profile || {});
1287 setStatus("画像已保存");
1288}
1289
1290async function refreshSettings() {
1291 const data = await api("/api/settings");

Callers

nothing calls this directly

Calls 6

setActiveUserFunction · 0.85
renderProfileFunction · 0.85
$Function · 0.70
setStatusFunction · 0.70
apiFunction · 0.70
loadUsersFunction · 0.70

Tested by

no test coverage detected