(options = {})
| 972 | } |
| 973 | |
| 974 | async function refreshDailyTaskStatus(options = {}) { |
| 975 | const userId = activeUser(); |
| 976 | if (!userId && !state.dailyTaskId) return; |
| 977 | const query = state.dailyTaskId |
| 978 | ? `task_id=${encodeURIComponent(state.dailyTaskId)}` |
| 979 | : `user_id=${encodeURIComponent(userId)}`; |
| 980 | const data = await api(`/api/daily/status?${query}`); |
| 981 | await handleDailyTask(data.task, options); |
| 982 | } |
| 983 | |
| 984 | async function runDaily() { |
| 985 | const userId = ensureUser(); |
no test coverage detected