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.
26 lines
520 B
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
|
|
})
|
|
}
|