Skip to content

Commit

Permalink
Fix format response
Browse files Browse the repository at this point in the history
  • Loading branch information
lgaticaq committed Oct 22, 2015
1 parent 4027905 commit 5f2c46a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hubot-hesidohackeado",
"version": "0.0.1",
"version": "0.0.2",
"description": "Un script hubot para consultar https://hesidohackeado.com",
"main": "index.coffee",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ module.exports = (robot) ->
else if data.status is "found"
text = ""
if data.results is 1
text += ">Hay *1* registro para #{email}"
text += ">Hay *1* registro para #{email}\n"
else
text += ">Hay *#{data.results}* registros para #{email}"
text += ">Hay *#{data.results}* registros para #{email}\n"
format = "YYYY-MM-DD HH:mm:ss"
for d in data.data
text += ">*Fecha*: #{moment(d.date_leaked).format(format)}\n"
Expand Down
2 changes: 1 addition & 1 deletion test/hesidohackeado_test.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe "hesidohackeado", ->
["pepito", "hubot hesidohackeado #{email}"],
[
"hubot",
">Hay *1* registro para #{email}" +
">Hay *1* registro para #{email}\n" +
">*Fecha*: #{moment("2015-09-04T00:00:00+02:00").format(format)}\n" +
">*Título*: Multiple Dating/Marriage Websites (9)\n" +
">*Autor*: smitz\n" +
Expand Down

0 comments on commit 5f2c46a

Please sign in to comment.