Mithril now can walks by itself

This commit is contained in:
2017-10-05 16:41:34 +07:00
parent ae762758fc
commit cfa0924ea7
26 changed files with 4299 additions and 1524 deletions

20
assets/js/models/post.js Normal file
View File

@@ -0,0 +1,20 @@
let m = require('mithril')
var post = {
list: [],
curStatus: 3,
interval: 10000,
loadList: function() {
return m.request({
method: 'GET',
url: '/api/posts/' + post.curStatus,
withCredentials: true
})
.then(function(result) {
post.list = result.data
console.log('cek')
})
}
}
module.exports = post