You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
canteen/uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/fission/accept-invite.js

26 lines
520 B

const {
acceptInvite
} = require('../../lib/utils/fission')
/**
* 接受邀请
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#accept-invite
* @param {Object} params
* @param {String} params.inviteCode 邀请码
* @returns
*/
module.exports = async function (params = {}) {
const schema = {
inviteCode: 'string'
}
this.middleware.validate(params, schema)
const {
inviteCode
} = params
const uid = this.authInfo.uid
return acceptInvite({
uid,
inviteCode
})
}