@kne/fastify-account 2.0.0-alpha.5 → 2.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,7 +33,8 @@ const accountController = fp(async (fastify, options) => {
|
|
|
33
33
|
schema: {
|
|
34
34
|
tags: ['账号'], summary: '发送登录短信验证码', body: {
|
|
35
35
|
type: 'object', required: ['phone'], properties: {
|
|
36
|
-
phone: { type: 'string', description: '电话' }
|
|
36
|
+
phone: { type: 'string', description: '电话' },
|
|
37
|
+
type: { type: 'number', description: '0:注册,2:登录,4:验证租户管理员,5:忘记密码', default: 0 }
|
|
37
38
|
}
|
|
38
39
|
}, response: {
|
|
39
40
|
200: {
|
|
@@ -50,8 +51,8 @@ const accountController = fp(async (fastify, options) => {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
}, async request => {
|
|
53
|
-
const { phone } = request.body;
|
|
54
|
-
const code = await services.account.sendVerificationCode({ name: phone, type
|
|
54
|
+
const { phone, type } = request.body;
|
|
55
|
+
const code = await services.account.sendVerificationCode({ name: phone, type });
|
|
55
56
|
return options.isTest ? { code } : {};
|
|
56
57
|
});
|
|
57
58
|
|