make sample data into array

pull/1758/head
Gabriel Engel 10 years ago
parent d60ae0651b
commit c5837cf972
  1. 25
      packages/rocketchat-integrations/server/api/api.coffee

@ -182,19 +182,38 @@ Api.addRoute 'remove/:integrationId/:userId/:token', authRequired: true,
Api.addRoute 'sample/:integrationId/:userId/:token', authRequired: true,
get: ->
console.log 'Sample integration'
console.log 'Sample Integration'
return {} =
statusCode: 200
body:
body: [
token: Random.id(24)
channel_id: Random.id()
channel_name: 'general'
timestamp: new Date
user_id: Random.id()
user_name: 'rocket.cat'
text: 'Sample text 1'
trigger_word: 'Sample'
],[
token: Random.id(24)
channel_id: Random.id()
channel_name: 'general'
timestamp: new Date
user_id: Random.id()
user_name: 'rocket.cat'
text: 'Sample text 2'
trigger_word: 'Sample'
],[
token: Random.id(24)
channel_id: Random.id()
channel_name: 'general'
timestamp: new Date
user_id: Random.id()
user_name: 'rocket.cat'
text: 'Sample text'
text: 'Sample text 3'
trigger_word: 'Sample'
]
Api.addRoute 'info/:integrationId/:userId/:token', authRequired: true,

Loading…
Cancel
Save