Browse Source

Sessão 21

master
eduveks 5 years ago
parent
commit
339e989f5e
5 changed files with 12 additions and 2 deletions
  1. +1
    -1
      config/_development.json
  2. BIN
      dbs/social_ma.mv.db
  3. +7
    -0
      server/services/jobs/daily-summary.js
  4. +2
    -0
      server/templates/dashboard.html
  5. +2
    -1
      server/templates/emails/daily-summary.html

+ 1
- 1
config/_development.json View File

@ -4,7 +4,7 @@
"jobs": [
{
"name": "daily-summary",
"config": "0 0 * * * ?",
"config": "0 0/1 * * * ?",
"url": "/services/jobs/daily-summary"
}
]


BIN
dbs/social_ma.mv.db View File


+ 7
- 0
server/services/jobs/daily-summary.js View File

@ -52,6 +52,13 @@ for (const dbComunidade of dbComunidades) {
.set("total", dbPublicacoes.getInt("total"))
)
smtp.attachment(
"logo.png",
"image/png",
_app.file("public/images/logo.png"),
"logo"
)
smtp.send()
_log.info("Pessoa:", dbPessoa)


+ 2
- 0
server/templates/dashboard.html View File

@ -21,6 +21,8 @@
</div>
</div>
<h1>Titulo _{request=nome}</h1>
<div id="app-dashboard"></div>
<div id="app-dashboard2"></div>

+ 2
- 1
server/templates/emails/daily-summary.html View File

@ -1,7 +1,8 @@
<div style="padding: 40px; background: #661b1a">
<img src="cid:logo" height="60" />
<div style="padding: 40px; background: #fff;">
_{data=comunidade}
<p>Olá _{req=pessoa},</p>
<p>Olá _{data=pessoa},</p>
Hoje houve _{data=total} novas publicações.
</div>
</div>

Loading…
Cancel
Save