[feat] Init code

This commit is contained in:
JasonWu
2021-08-31 18:24:42 +08:00
commit b1e9c5e62a
57 changed files with 17957 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
const Router = require('@koa/router');
const joi = require('joi');
const commonCtrl = require('src/controllers/common/index.js');
const accCtrl = require('src/controllers/account/v1/index.js');
const r = new Router({ prefix: '/account' });
module.exports = r;
/**
* get account info
* @swagger
* @route GET /api/v1/account/login/sso
* @group account - account apis
* @param {string} back_url.query.required - back to url
* @returns {RespDefault.model} default -
*/
r.get(
'/login/sso',
commonCtrl.validate({
query: {
back_url: joi.string().required(),
},
}),
accCtrl.loginSSO()
);