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