It’s from the index
route and It’s using ember-data:
import Ember from 'ember';
import formatMoney from "accounting/format-money"
export default Ember.Route.extend({
model() {
return this.get('store').findAll('contrato');
},
setupController(controller, model) {
this._super(controller, model);
this.get('store').findAll('contrato').then((contratos) => {
let total = contratos.reduce((a, b) => {
return a + b.get("value");
}, 0);
this.controllerFor('index').set('totalSum', formatMoney(total, "R$", 2, ".", ","));
});
},
});
It’s really weird and I’m still lost trying to solve it. Does it have something to do with nginx? Here’s the nginx.conf
file:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events
{
worker_connections 1024;
}
http
{
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
access_log /var/log/nginx/access.log;
keepalive_timeout 3000;
server
{
listen 80;
root /app;
client_max_body_size 32m;
location /
{
try_files $uri /index.html;
}
}
}