questionnaire/assets/js/models/Section.js

21 lines
418 B
JavaScript
Vendored

import m from "mithril"
const Section = {
current: {},
list: [],
loading: false,
fetch: function(id) {
Section.loading = true
m.request({
url: "http://api.questionnaire.dev/v1/sections/" + id,
method: "GET"
})
.then(function(res) {
Section.current = res
Section.loading = false
})
}
}
export default Section