"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("../util");
const index_1 = require("@node-novel/site-cache-util/lib/index");
/**
 * Created by user on 2019/12/16.
 */
exports.default = index_1.lazyRun(async () => {
    const { api, saveCache } = await util_1.getApiClient();
    if (!await api.hasCookiesAuth()) {
        return;
    }
    await api.taskList()
        .then(data => {
        util_1.consoleDebug.dir(data);
        return data.allow;
    })
        .mapSeries(task => {
        return api
            .taskApply(task.task_id)
            .tap(e => {
            util_1.consoleDebug.debug(`[task]`, task);
        });
    });
    await api.noticeView('system');
}, {
    pkgLabel: __filename,
});
//# sourceMappingURL=task_logined.js.map