()
| 4096 | } |
| 4097 | |
| 4098 | async function refreshWiki() { |
| 4099 | const data = await api("/api/wiki/refresh", { |
| 4100 | method: "POST", |
| 4101 | body: JSON.stringify({ user_id: currentUser() }) |
| 4102 | }); |
| 4103 | await loadWiki(); |
| 4104 | const daily = data.daily_notes || {}; |
| 4105 | const noteCount = Array.isArray(daily.daily_notes) ? daily.daily_notes.length : 0; |
| 4106 | const errorCount = Array.isArray(daily.errors) ? daily.errors.length : 0; |
| 4107 | const detail = [ |
| 4108 | ui().wiki.refreshDetail(daily, noteCount) |
| 4109 | ].join(" · "); |
| 4110 | showFeedbackToast( |
| 4111 | errorCount ? "warning" : "success", |
| 4112 | errorCount ? ui().wiki.refreshPartial : ui().wiki.refreshDone, |
| 4113 | errorCount ? `${detail} · ${daily.errors[0]}` : detail |
| 4114 | ); |
| 4115 | } |
| 4116 | |
| 4117 | function githubSyncSummary(data) { |
| 4118 | const labels = ui().wiki.githubSync; |
nothing calls this directly
no test coverage detected