1 | 'use strict'
|
2 |
|
3 | module.exports = function (heroku) {
|
4 | function getLogDrain (space) {
|
5 | return heroku.request({
|
6 | path: `/spaces/${space}/log-drain`,
|
7 | headers: {Accept: 'application/vnd.heroku+json; version=3.dogwood'}
|
8 | })
|
9 | }
|
10 |
|
11 | function putLogDrain (space, url) {
|
12 | return heroku.request({
|
13 | method: 'PUT',
|
14 | path: `/spaces/${space}/log-drain`,
|
15 | body: {
|
16 | url: url
|
17 | },
|
18 | headers: {Accept: 'application/vnd.heroku+json; version=3.dogwood'}
|
19 | })
|
20 | }
|
21 |
|
22 | return {
|
23 | getLogDrain,
|
24 | putLogDrain
|
25 | }
|
26 | }
|