Skip to content

Commit

Permalink
fix: 修改 builtin cloudfunction sig
Browse files Browse the repository at this point in the history
  • Loading branch information
maslow committed Jun 21, 2021
1 parent 4671c36 commit f379369
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 61 deletions.
28 changes: 0 additions & 28 deletions http/user_login.http

This file was deleted.

28 changes: 0 additions & 28 deletions http/user_register.http

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const templateCode = 'SMS_217850726' // 短信模板,修改为你的模板ID
* @body phone string 手机号
* @body code string | number 验证码
*/
async function main (ctx) {
exports.main = async function (ctx) {
const phone = ctx.body?.phone
if (!phone) {
return 'error: invalid phone'
Expand Down
File renamed without changes.
5 changes: 4 additions & 1 deletion init/functions/send-login-smscode/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@

/**
* @api
* @body phone string 手机号
*/
async function main (ctx) {

// main function
exports.main = async function (ctx) {
const db = less.database()
const phone = ctx.body?.phone
if (!phone) {
Expand Down
2 changes: 1 addition & 1 deletion init/functions/user-passwd-login/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as crypto from 'crypto'
* @body username string 用户名
* @body password string 密码
*/
export async function main(ctx) {
exports.main = async function (ctx) {
const db = less.database()

// 参数验证
Expand Down
2 changes: 1 addition & 1 deletion init/functions/user-password-register/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as crypto from 'crypto'
* @body username string 用户名
* @body password string 密码
*/
export async function main(ctx) {
exports.main = async function (ctx) {
const db = less.database()

// 参数验证
Expand Down
5 changes: 4 additions & 1 deletion init/functions/wx-mp-login/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const appid = "修改为你的小程序 AppId" // 微信小程序 AppId
const appsecret = "修改为你的小程序 AppSecret" // 微信小程序 AppSecret

// 主函数
/**
* @body string code
* @returns
*/
exports.main = async function (ctx) {
const db = less.database()

Expand Down

0 comments on commit f379369

Please sign in to comment.