Skip to content

Commit

Permalink
Merge pull request #65 from FlowFuse/64-fix-owner-determination
Browse files Browse the repository at this point in the history
Better determination of device owner
  • Loading branch information
hardillb authored Mar 15, 2024
2 parents 2b70c7a + 9dbe026 commit ae6ae46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nodes/project-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ module.exports = function (RED) {
const API_VERSION = 'v1'
const TOPIC_HEADER = 'ff'
const TOPIC_VERSION = 'v1'
const OWNER_TYPE = RED.settings.flowforge.applicationID ? 'application' : 'instance'
// It is not unreasonable to expect `projectID` and `applicationID` are set for an instance
// owned device, however an application owned device should not have a projectID.
// therefore, assume project owned if `projectID` is set
const OWNER_TYPE = RED.settings.flowforge.projectID ? 'instance' : 'application'

// #region JSDoc

Expand Down

0 comments on commit ae6ae46

Please sign in to comment.