Skip to content

Commit

Permalink
#471 Add raw_file_description
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Dec 14, 2023
1 parent 43c65a1 commit 341541e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions API/Backend/Webhooks/processes/triggerwebhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ function getInjectableVariables(type, file, res) {
injectableVariables.file_id = injectableVariables.id;

if (typeof injectableVariables.file_description === "string") {
injectableVariables.raw_file_description =
injectableVariables.file_description;
const tags = injectableVariables.file_description.match(/~#\w+/g) || [];
const uniqueTags = [...tags];
// remove '#'s
Expand Down
2 changes: 1 addition & 1 deletion config/js/webhooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function makeWebhookCard(data) {
"</li>" +
"<li class='row'>" +
"<div class='inject-label input-field col s9' id='webhookUrlEl'>" +
"<label style='top: 0px; font-size: 14px;'>Valid injectable variables for URL and Body fields: {created_on}, {efolders}, {file_description}, {file_id}, {file_name}, {file_owner}, {file_owner_group}, {folders}, {geojson}, {hidden}, {intent}, {is_master}, {public}, {public_editors}, {publicity_type}, {tags}, {template}, {updated_on}</label>" +
"<label style='top: 0px; font-size: 14px;'>Valid injectable variables for URL and Body fields: {created_on}, {efolders}, {file_description}, {file_id}, {file_name}, {file_owner}, {file_owner_group}, {folders}, {geojson}, {hidden}, {intent}, {is_master}, {public}, {public_editors}, {publicity_type}, {raw_file_description}, {tags}, {template}, {updated_on}</label>" +
"</div>" +
"<div class='col s3 push-s1' id='deleteWebhook_" + webhooksCounter +"'>" +
"<a class='btn waves-effect' style='color: black; background: white;'>Delete<i class='mdi mdi-delete mdi-24px' style='float: right; margin-top: 1px;'></i></a>" +
Expand Down

0 comments on commit 341541e

Please sign in to comment.