bruce-models 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5007,28 +5007,25 @@
5007
5007
  /**
5008
5008
  * Completes signup using user data and a signup code.
5009
5009
  * @param api
5010
- * @param accountId
5011
5010
  * @param code
5012
5011
  * @param data
5012
+ * @param accountId
5013
5013
  * @returns
5014
5014
  */
5015
- function SignupComplete(api, accountId, code, data) {
5015
+ function SignupComplete(api, code, data, accountId) {
5016
5016
  return __awaiter(this, void 0, void 0, function () {
5017
5017
  var res;
5018
5018
  return __generator(this, function (_a) {
5019
5019
  switch (_a.label) {
5020
5020
  case 0:
5021
- if (!code || !accountId) {
5022
- throw ("Activation code and account ID are required.");
5023
- }
5024
- if (!(data === null || data === void 0 ? void 0 : data.Login) || !(data === null || data === void 0 ? void 0 : data.Password)) {
5025
- throw ("Login and password are required.");
5021
+ if (!code || !(data === null || data === void 0 ? void 0 : data.Login) || !(data === null || data === void 0 ? void 0 : data.Password)) {
5022
+ throw ("Login, password, and activation code are required.");
5026
5023
  }
5027
5024
  data = JSON.parse(JSON.stringify(data));
5028
5025
  data.IsActivated = true;
5029
5026
  data.IsDisabled = false;
5030
5027
  data.key = code;
5031
- return [4 /*yield*/, api.POST("UserActivate/" + accountId, data)];
5028
+ return [4 /*yield*/, api.POST("UserActivate/" + (accountId ? accountId : ""), data)];
5032
5029
  case 1:
5033
5030
  res = _a.sent();
5034
5031
  api.Cache.RemoveByContains(exports.Api.ECacheKey.User + exports.Api.ECacheKey.Id + res.ID);