Members
purgeInviteCode
Purge all invite codes that are past their expiration for a month. Runs daily at 12 midnight Hong Kong time.
Methods
createInviteCode(data) → {object}
Create a new one-time invite code
Example
createInviteCode({
uid: "hk_wx5555556",
});
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
data |
object | Wrapper object for data Properties
|
Requires:
Returns:
Data object of Generated one-time invite code. Including inviteCode, description, expiration, and quota
- Type
- object
useInviteCode(data) → {boolean}
Consume an invite code
Example
useInviteCode({
uid: "hk_wx5555556",
inviteCode: "ENRICH",
});
Parameters:
| Name | Type | Description | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
data |
object | Wrapper object for data Properties
|
Requires:
Returns:
Return true if invite code has been consumed successfully.
- Type
- boolean