Refactor OAuth application stuff

This commit is contained in:
Schuyler Cebulskie
2016-10-30 16:55:08 -04:00
parent 589c44327a
commit 85330769a7
6 changed files with 18 additions and 18 deletions

View File

@@ -0,0 +1,26 @@
const User = require('./User');
const OAuth2Application = require('./OAuth2Application');
/**
* Represents the client's OAuth2 Application
* @extends {OAuth2Application}
*/
class ClientOAuth2Application extends OAuth2Application {
setup(data) {
super.setup(data);
/**
* The app's flags
* @type {int}
*/
this.flags = data.flags;
/**
* The app's owner
* @type {User}
*/
this.owner = new User(this.client, data.owner);
}
}
module.exports = ClientOAuth2Application;