Skip to content

Commit

Permalink
add App.onOAuth2Uninit, Driver.onOAuth2Uninit
Browse files Browse the repository at this point in the history
  • Loading branch information
WeeJeWel committed Nov 6, 2024
1 parent 5d90e0a commit 403706b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/OAuth2App.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,27 @@ class OAuth2App extends Homey.App {
await this.onOAuth2Init();
}

/**
* @returns {Promise<void>}
*/
async onUninit() {
await this.onOAuth2Uninit();
}

/**
* @returns {Promise<void>}
*/
async onOAuth2Init() {
// Overload Me
}

/**
* @returns {Promise<void>}
*/
async onOAuth2Uninit() {
// Overload Me
}

/**
*/
enableOAuth2Debug() {
Expand Down
16 changes: 16 additions & 0 deletions lib/OAuth2Driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ class OAuth2Driver extends Homey.Driver {
await this.onOAuth2Init();
}

/**
* @returns {Promise<void>}
*/
async onUninit() {
await this.onOAuth2Uninit();
}

/**
* @description
* > This method can be extended
Expand All @@ -33,6 +40,15 @@ class OAuth2Driver extends Homey.Driver {
// Extend me
}

/**
* @description
* > This method can be extended
* @returns {Promise<void>}
*/
async onOAuth2Uninit() {
// Extend me
}

/**
* @returns {*}
*/
Expand Down

0 comments on commit 403706b

Please sign in to comment.