umwd-components 0.1.436 → 0.1.437

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.
@@ -4,4 +4,4 @@
4
4
  * @copyright Jelle Paulus
5
5
  * @license MIT
6
6
  */
7
- import{__awaiter as e,__generator as r,__assign as t}from"../../../node_modules/tslib/tslib.es6.js";import{getStrapiURL as n}from"../../lib/utils.js";var s=n();function o(n){return e(this,void 0,void 0,(function(){var e,o,a;return r(this,(function(r){switch(r.label){case 0:e=new URL("/api/auth/local/register",s),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t({},n)),cache:"no-cache"})];case 2:if(!(o=r.sent()).ok)throw new Error("HTTP error! status: ".concat(o.status));return[2,o.json()];case 3:throw a=r.sent(),console.error("Registration Service Error:",a),a;case 4:return[2]}}))}))}function a(n){return e(this,void 0,void 0,(function(){var e,o,a;return r(this,(function(r){switch(r.label){case 0:e=new URL("/api/auth/local",s),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t({},n)),cache:"no-cache"})];case 2:if(!(o=r.sent()).ok)throw new Error("HTTP error! status: ".concat(o.status));return[2,o.json()];case 3:throw a=r.sent(),console.error("Login Service Error:",a),a;case 4:return[2]}}))}))}function i(t){return e(this,void 0,void 0,(function(){var e,n;return r(this,(function(r){switch(r.label){case 0:e=new URL("/api/auth/forgot-password",s),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})];case 2:return[4,r.sent().json()];case 3:return[2,r.sent()];case 4:return n=r.sent(),console.error("Error in forgotPasswordService:",n),[2,null];case 5:return[2]}}))}))}function c(t){return e(this,void 0,void 0,(function(){var e,n;return r(this,(function(r){switch(r.label){case 0:e=new URL("/api/auth/reset-password",s),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})];case 2:return[4,r.sent().json()];case 3:return[2,r.sent()];case 4:return n=r.sent(),console.error("Error in resetPasswordService:",n),[2,null];case 5:return[2]}}))}))}export{i as forgotPasswordService,a as loginUserService,o as registerUserService,c as resetPasswordService};
7
+ import{__awaiter as e,__generator as r,__assign as n}from"../../../node_modules/tslib/tslib.es6.js";import{getStrapiURL as t}from"../../lib/utils.js";var s=t();function o(t){return e(this,void 0,void 0,(function(){var e,o,a;return r(this,(function(r){switch(r.label){case 0:e=new URL("/api/auth/local/register",s),r.label=1;case 1:return r.trys.push([1,5,,6]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n({},t)),cache:"no-cache"})];case 2:return(o=r.sent()).ok?[3,4]:[4,o.json()];case 3:return[2,{error:r.sent()}];case 4:return[2,o.json()];case 5:return a=r.sent(),console.error("Registration Service Error:",a),[2,{error:a instanceof Error?a.message:"Unknown error"}];case 6:return[2]}}))}))}function a(t){return e(this,void 0,void 0,(function(){var e,o,a;return r(this,(function(r){switch(r.label){case 0:e=new URL("/api/auth/local",s),r.label=1;case 1:return r.trys.push([1,5,,6]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n({},t)),cache:"no-cache"})];case 2:return(o=r.sent()).ok?[3,4]:[4,o.json()];case 3:return[2,{error:r.sent()}];case 4:return[2,o.json()];case 5:return a=r.sent(),console.error("Login Service Error:",a),[2,{error:a instanceof Error?a.message:"Unknown error"}];case 6:return[2]}}))}))}function c(n){return e(this,void 0,void 0,(function(){var e,t;return r(this,(function(r){switch(r.label){case 0:e=new URL("/api/auth/forgot-password",s),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})];case 2:return[4,r.sent().json()];case 3:return[2,r.sent()];case 4:return t=r.sent(),console.error("Error in forgotPasswordService:",t),[2,null];case 5:return[2]}}))}))}function i(n){return e(this,void 0,void 0,(function(){var e,t;return r(this,(function(r){switch(r.label){case 0:e=new URL("/api/auth/reset-password",s),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})];case 2:return[4,r.sent().json()];case 3:return[2,r.sent()];case 4:return t=r.sent(),console.error("Error in resetPasswordService:",t),[2,null];case 5:return[2]}}))}))}export{c as forgotPasswordService,a as loginUserService,o as registerUserService,i as resetPasswordService};