-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
204 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
const Base = require('./base'); | ||
|
||
module.exports = class extends Base {}; | ||
module.exports = class extends Base { | ||
/** | ||
* @api {GET} /oauth/github github oauth api | ||
* @apiGroup OAuth | ||
* @apiVersion 0.0.1 | ||
*/ | ||
githubAction() {} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,46 @@ | ||
const Base = require('./base'); | ||
|
||
module.exports = class extends Base {}; | ||
module.exports = class extends Base { | ||
/** | ||
* @api {GET} /token get login user info | ||
* @apiGroup User | ||
* @apiVersion 0.0.1 | ||
* | ||
* @apiSuccess (200) {Number} errno 0 | ||
* @apiSuccess (200) {String} errmsg return error message if error | ||
* @apiSuccess (200) {Object} data user info | ||
* @apiSuccess (200) {String} data.avatar user avatar | ||
* @apiSuccess (200) {String} data.createdAt user register time | ||
* @apiSuccess (200) {String} data.display_name user nick name | ||
* @apiSuccess (200) {String} data.emal user email address | ||
* @apiSuccess (200) {String} data.github user github account name | ||
* @apiSuccess (200) {String} data.mailMd5 user mail md5 | ||
* @apiSuccess (200) {String} data.objectId user id | ||
* @apiSuccess (200) {String} data.type user type, administrator or guest | ||
* @apiSuccess (200) {String} data.url user link | ||
*/ | ||
getAction() {} | ||
|
||
/** | ||
* @api {POST} /token user login | ||
* @apiGroup User | ||
* @apiVersion 0.0.1 | ||
* | ||
* @apiParam {String} email login user email | ||
* @apiParam {String} password login user password | ||
* | ||
* @apiSuccess (200) {Number} errno 0 | ||
* @apiSuccess (200) {String} errmsg return error message if error | ||
*/ | ||
postAction() {} | ||
|
||
/** | ||
* @api {DELETE} /token user logout | ||
* @apiGroup User | ||
* @apiVersion 0.0.1 | ||
* | ||
* @apiSuccess (200) {Number} errno 0 | ||
* @apiSuccess (200) {String} errmsg return error message if error | ||
*/ | ||
deleteAction() {} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters