import m from "mithril"

const Answer = {
    list: [],
    current: {},
    loading: false,
    fetch: function(answerId) {
        Answer.loading = true
        m.request({
            url: "http://api.questionnaire.dev/v1/answers/" + answerId,
            method: "GET"
        })
        .then(function(res) {
            Answer.loading = false
            console.log("response: ", res);
        })
    }
}

export default Answer
