Skip to content

Commit

Permalink
Expose extension dir
Browse files Browse the repository at this point in the history
  • Loading branch information
javalikescript committed Dec 6, 2024
1 parent f2a0d29 commit 3a66a30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions extensions/web-dashboard/web-dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,7 @@ define(['./web-dashboard.xml'], function(dashboardTemplate) {
methods: {
onShow: function() {
Promise.all([
fetch('/engine/configuration/extensions/' + extensionId).then(function(response) {
return response.json();
}).then(function(response) {
fetch('/engine/configuration/extensions/' + extensionId).then(rejectIfNotOk).then(getJson).then(function(response) {
return response.value;
}),
app.getThingsById(),
Expand Down
4 changes: 4 additions & 0 deletions lha/Engine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ return class.create(function(engine)
return self.idGenerator:generate()
end

function engine:getExtensionsDirectory()
return self.extensionsDir
end

function engine:getScriptsDirectory()
return self.scriptsDir
end
Expand Down

0 comments on commit 3a66a30

Please sign in to comment.