Skip to content

Commit 0c14ba5

Browse files
authored
Merge pull request #41 from gtt-project/next
Updates main branch
2 parents ee8753d + 4509a6a commit 0c14ba5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

app/controllers/subscription_templates_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,10 @@ def prepare_payload
137137
method: "POST",
138138
json: {
139139
entity: "#{@entity_url}/${id}?type=${type}",
140-
subject: @subscription_template.subject,
141-
description: @subscription_template.description,
140+
subject: @subscription_template.subject.chomp,
141+
description: @subscription_template.description.chomp,
142142
attachments: @subscription_template.attachments,
143-
notes: @subscription_template.notes,
143+
notes: @subscription_template.notes.chomp,
144144
geometry: @subscription_template.geometry
145145
}
146146
}

app/views/subscription_templates/unpublish.js.erb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
// Build the request headers
22
var headers = new Headers();
33

4+
<% if @subscription_template.fiware_service.present? %>
5+
headers.append('Fiware-Service', '<%= @subscription_template.fiware_service %>');
6+
<% end %>
7+
8+
<% if @subscription_template.fiware_servicepath.present? %>
9+
headers.append('Fiware-ServicePath', '<%= @subscription_template.fiware_servicepath %>');
10+
<% end %>
11+
412
var authToken = document.getElementById('subscription_auth_token').value;
513
if (authToken) {
614
headers.append('Authorization', 'Bearer ' + authToken);

0 commit comments

Comments
 (0)