12345678910111213141516171819202122232425 |
- 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
- })
- }
|