talk.js 570 Bytes
const canvas = require('./khcanvas')
const selector = require('./schedule_selector')

function start(id, pw) {
    const today = new Date()
    const filter_result = filter_date(today, id, pw)

    if(filter_result) {
        return filter_result
    }


}

function filter_date(date, id, pw) {
    const schedule = canvas.get_schedule(id, pw, date)
    const first_todo = selector.is_possible_schedule(date, schedule)

    if(first_todo) {
        return `제출되지 않은 과제가 있습니다. ${first_todo}`
    }

    return null
}

module.exports.start = start